Merged the "init-db" console command to the Flask application initialization in the test site, to simplify the code.
This commit is contained in:
@ -78,10 +78,8 @@ class AccountTestCase(unittest.TestCase):
|
||||
runner: FlaskCliRunner = self.app.test_cli_runner()
|
||||
with self.app.app_context():
|
||||
from accounting.models import Account, AccountL10n
|
||||
result: Result
|
||||
result = runner.invoke(args="init-db")
|
||||
self.assertEqual(result.exit_code, 0)
|
||||
result = runner.invoke(args=["accounting-init-db", "-u", "editor"])
|
||||
result: Result = runner.invoke(
|
||||
args=["accounting-init-db", "-u", "editor"])
|
||||
self.assertEqual(result.exit_code, 0)
|
||||
AccountL10n.query.delete()
|
||||
Account.query.delete()
|
||||
|
Reference in New Issue
Block a user