Revised the test_update_not_modified tests to be more specific in the AccountTestCase and CurrencyTestCase test cases.

This commit is contained in:
依瑪貓 2023-02-21 09:38:31 +08:00
parent a4c89f1494
commit d9c08568cf
2 changed files with 4 additions and 4 deletions

View File

@ -517,7 +517,7 @@ class AccountTestCase(unittest.TestCase):
with self.app.app_context(): with self.app.app_context():
cash_account: Account = Account.find_by_code(cash.code) cash_account: Account = Account.find_by_code(cash.code)
self.assertIsNotNone(cash_account) self.assertIsNotNone(cash_account)
self.assertNotEqual(cash_account.created_at, self.assertLess(cash_account.created_at,
cash_account.updated_at) cash_account.updated_at)
def test_created_updated_by(self) -> None: def test_created_updated_by(self) -> None:

View File

@ -463,7 +463,7 @@ class CurrencyTestCase(unittest.TestCase):
with self.app.app_context(): with self.app.app_context():
zza_currency: Currency = db.session.get(Currency, zza.code) zza_currency: Currency = db.session.get(Currency, zza.code)
self.assertIsNotNone(zza_currency) self.assertIsNotNone(zza_currency)
self.assertNotEqual(zza_currency.created_at, self.assertLess(zza_currency.created_at,
zza_currency.updated_at) zza_currency.updated_at)
def test_created_updated_by(self) -> None: def test_created_updated_by(self) -> None: