We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f89fdf6 commit 46354ccCopy full SHA for 46354cc
1 file changed
tests/conftest.py
@@ -1,3 +1,7 @@
1
+import os
2
+# Set a dummy database before importing main.py so it doesn't attempt to connect to PostgreSQL!
3
+os.environ["DATABASE_URL"] = "sqlite:///:memory:"
4
+
5
import pytest
6
from fastapi.testclient import TestClient
7
from sqlalchemy import create_engine
0 commit comments