From d9c08568cf9848078b6ac8b3d48fb3a4be10f22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 21 Feb 2023 09:38:31 +0800 Subject: [PATCH] Revised the test_update_not_modified tests to be more specific in the AccountTestCase and CurrencyTestCase test cases. --- tests/test_account.py | 4 ++-- tests/test_currency.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_account.py b/tests/test_account.py index 68b2bf7..fe20bcf 100644 --- a/tests/test_account.py +++ b/tests/test_account.py @@ -517,8 +517,8 @@ class AccountTestCase(unittest.TestCase): with self.app.app_context(): cash_account: Account = Account.find_by_code(cash.code) self.assertIsNotNone(cash_account) - self.assertNotEqual(cash_account.created_at, - cash_account.updated_at) + self.assertLess(cash_account.created_at, + cash_account.updated_at) def test_created_updated_by(self) -> None: """Tests the created-by and updated-by record. diff --git a/tests/test_currency.py b/tests/test_currency.py index a657462..a0d2a6c 100644 --- a/tests/test_currency.py +++ b/tests/test_currency.py @@ -463,8 +463,8 @@ class CurrencyTestCase(unittest.TestCase): with self.app.app_context(): zza_currency: Currency = db.session.get(Currency, zza.code) self.assertIsNotNone(zza_currency) - self.assertNotEqual(zza_currency.created_at, - zza_currency.updated_at) + self.assertLess(zza_currency.created_at, + zza_currency.updated_at) def test_created_updated_by(self) -> None: """Tests the created-by and updated-by record.