Add init options to skip data initialization and remove manual cleanup in test cases.
This commit is contained in:
@@ -65,15 +65,9 @@ class CurrencyTestCase(unittest.TestCase):
|
||||
|
||||
:return: None.
|
||||
"""
|
||||
self.__app: Flask = create_test_app()
|
||||
self.__app: Flask = create_test_app(is_skip_currencies=True)
|
||||
"""The Flask application."""
|
||||
|
||||
with self.__app.app_context():
|
||||
from accounting.models import Currency, CurrencyL10n
|
||||
CurrencyL10n.query.delete()
|
||||
Currency.query.delete()
|
||||
db.session.commit()
|
||||
|
||||
self.__client: httpx.Client = get_client(self.__app, "editor")
|
||||
"""The user client."""
|
||||
self.__csrf_token: str = get_csrf_token(self.__client)
|
||||
|
||||
Reference in New Issue
Block a user