mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix issue with tests + some cleaning.
This commit is contained in:
1 parent
fd844c309e
commit
91920e5a5b
7 files changed
+17
-40
No files matched your search
+2
-2
@@ -62,12 +62,12 @@ async def app() -> FastAPI:
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def db_engine():
|
||||
async def db_engine():
|
||||
|
||||
db_url = os.getenv("GNS3_TEST_DATABASE_URI", "sqlite+aiosqlite:///:memory:") # "sqlite:///./sql_test_app.db"
|
||||
engine = create_async_engine(db_url, connect_args={"check_same_thread": False}, future=True)
|
||||
yield engine
|
||||
engine.sync_engine.dispose()
|
||||
#await engine.sync_engine.dispose()
|
||||
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
|
||||
Reference in new issue
Block a user