Skip to content

Commit ae244be

Browse files
MaxNumeriquegithub-actions[bot]
authored andcommitted
Apply prepare changes
1 parent 4655a9e commit ae244be

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/opengeodeweb_microservice/database/connection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ def get_database() -> Optional[SQLAlchemy]:
2626
def get_session():
2727
return db.session if db else None
2828

29+
2930
get_database_connection = get_database

tests/conftest.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@
88
@pytest.fixture(scope="session")
99
def app():
1010
app = Flask(__name__)
11-
app.config.update({
12-
"TESTING": True,
13-
"SQLALCHEMY_DATABASE_URI": f"sqlite:///{os.path.join(os.path.dirname(__file__), 'test_project.db')}",
14-
"SQLALCHEMY_TRACK_MODIFICATIONS": False
15-
})
11+
app.config.update(
12+
{
13+
"TESTING": True,
14+
"SQLALCHEMY_DATABASE_URI": f"sqlite:///{os.path.join(os.path.dirname(__file__), 'test_project.db')}",
15+
"SQLALCHEMY_TRACK_MODIFICATIONS": False,
16+
}
17+
)
1618
with app.app_context():
1719
init_database(app, "test_project.db")
1820
yield app
1921
_cleanup_database()
2022

23+
2124
def _cleanup_database():
2225
try:
2326
session = get_session()

0 commit comments

Comments
 (0)