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 9efbbc38ab
12 changed files with 40 additions and 51 deletions

View File

@@ -45,11 +45,6 @@ class ReportTestCase(unittest.TestCase):
self.__app: Flask = create_test_app()
"""The Flask application."""
with self.__app.app_context():
from accounting.models import JournalEntry, JournalEntryLineItem
JournalEntry.query.delete()
JournalEntryLineItem.query.delete()
self.__client: httpx.Client = get_client(self.__app, "editor")
"""The user client."""
self.__csrf_token: str = get_csrf_token(self.__client)