Renamed the variable in the test_created_updated_by test of the CurrencyTestCase test case.

This commit is contained in:
依瑪貓 2023-02-07 09:47:32 +08:00
parent 0491614ae4
commit a78057a8c3

View File

@ -464,9 +464,9 @@ class CurrencyTestCase(unittest.TestCase):
response: httpx.Response
with self.app.app_context():
currency: Currency = db.session.get(Currency, zza.code)
self.assertEqual(currency.created_by.username, editor_username)
self.assertEqual(currency.updated_by.username, editor_username)
zza_currency: Currency = db.session.get(Currency, zza.code)
self.assertEqual(zza_currency.created_by.username, editor_username)
self.assertEqual(zza_currency.updated_by.username, editor_username)
response = client.post(update_uri,
data={"csrf_token": csrf_token,
@ -476,9 +476,9 @@ class CurrencyTestCase(unittest.TestCase):
self.assertEqual(response.headers["Location"], detail_uri)
with self.app.app_context():
currency: Currency = db.session.get(Currency, zza.code)
self.assertEqual(currency.created_by.username, editor_username)
self.assertEqual(currency.updated_by.username, editor2_username)
zza_currency: Currency = db.session.get(Currency, zza.code)
self.assertEqual(zza_currency.created_by.username, editor_username)
self.assertEqual(zza_currency.updated_by.username, editor2_username)
def test_l10n(self) -> None:
"""Tests the localization.