Merged the "accounting.database" module into the "accounting" module. It has only one member as "db", the database instance, and does not need to be separated into another file.
This commit is contained in:
@ -75,7 +75,7 @@ class AccountCommandTestCase(unittest.TestCase):
|
||||
|
||||
runner: FlaskCliRunner = self.app.test_cli_runner()
|
||||
with self.app.app_context():
|
||||
from accounting.database import db
|
||||
from accounting import db
|
||||
from accounting.models import BaseAccount, Account, AccountL10n
|
||||
result: Result
|
||||
result = runner.invoke(args="init-db")
|
||||
@ -129,7 +129,7 @@ class AccountTestCase(unittest.TestCase):
|
||||
|
||||
runner: FlaskCliRunner = self.app.test_cli_runner()
|
||||
with self.app.app_context():
|
||||
from accounting.database import db
|
||||
from accounting import db
|
||||
from accounting.models import BaseAccount, Account, AccountL10n
|
||||
result: Result
|
||||
result = runner.invoke(args="init-db")
|
||||
@ -316,7 +316,7 @@ class AccountTestCase(unittest.TestCase):
|
||||
|
||||
:return: None.
|
||||
"""
|
||||
from accounting.database import db
|
||||
from accounting import db
|
||||
from accounting.models import Account
|
||||
create_uri: str = f"{PREFIX}/create"
|
||||
store_uri: str = f"{PREFIX}/store"
|
||||
@ -648,7 +648,7 @@ class AccountTestCase(unittest.TestCase):
|
||||
|
||||
:return: None.
|
||||
"""
|
||||
from accounting.database import db
|
||||
from accounting import db
|
||||
from accounting.models import Account
|
||||
response: httpx.Response
|
||||
|
||||
|
@ -71,7 +71,7 @@ class CurrencyCommandTestCase(unittest.TestCase):
|
||||
|
||||
runner: FlaskCliRunner = self.app.test_cli_runner()
|
||||
with self.app.app_context():
|
||||
from accounting.database import db
|
||||
from accounting import db
|
||||
from accounting.models import Currency, CurrencyL10n
|
||||
result: Result
|
||||
result = runner.invoke(args="init-db")
|
||||
@ -128,7 +128,7 @@ class CurrencyTestCase(unittest.TestCase):
|
||||
|
||||
runner: FlaskCliRunner = self.app.test_cli_runner()
|
||||
with self.app.app_context():
|
||||
from accounting.database import db
|
||||
from accounting import db
|
||||
from accounting.models import Currency, CurrencyL10n
|
||||
result: Result
|
||||
result = runner.invoke(args="init-db")
|
||||
|
Reference in New Issue
Block a user