TOSIT-IO / tdp-lib

Python library to configure, manage and deploy TDP
Apache License 2.0
4 stars 8 forks source link

refactor: engine in test procedure #584

Closed SteBaum closed 6 months ago

SteBaum commented 6 months ago

Which issue(s) this PR fixes

Fixes None

Additional comments

This PR is necessary for the PR Dev/alembic migration #563. When we integrate Alembic in the init command, it creates a new engine and synchronization problems occur between the engines when launching the unit tests although it works manually when we perform one command after another. Therefore, the init command has been left out of all unit tests and replaced with hard coded initialization except the test which specifically tests the init command of course.

The engine is created and closed also in the tests since we import the functions with the click decorators which take as input a database-dsn and not an engine.

Agreements