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,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.

View File

@ -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.