Add init options to skip data initialization and remove manual cleanup in test cases.

This commit is contained in:
2026-01-11 11:51:49 +08:00
parent 693c5890ca
commit d62e295dc6
11 changed files with 39 additions and 50 deletions

View File

@@ -72,14 +72,10 @@ class AccountTestCase(unittest.TestCase):
:return: None.
"""
self.__app: Flask = create_test_app()
self.__app: Flask = create_test_app(is_skip_accounts=True)
"""The Flask application."""
with self.__app.app_context():
from accounting.models import Account, AccountL10n
AccountL10n.query.delete()
Account.query.delete()
db.session.commit()
self.__encoded_next_uri: str = encode_next(NEXT_URI)
"""The encoded next URI."""