mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-20 05:05:14 +02:00
Use aiosqlite and add service for templates
This commit is contained in:
1 parent
d730c591b3
commit
0fea3f969e
14 files changed
+290
-230
No files matched your search
+1
-1
@@ -64,7 +64,7 @@ async def app() -> FastAPI:
|
||||
@pytest.fixture(scope="class")
|
||||
def db_engine():
|
||||
|
||||
db_url = os.getenv("GNS3_TEST_DATABASE_URI", "sqlite:///:memory:") # "sqlite:///./sql_test_app.db"
|
||||
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()
|
||||
|
||||
Reference in new issue
Block a user