This commit is contained in:
2026-06-09 23:11:37 +02:00
parent 2586d458b2
commit ecfd72e415
6 changed files with 35 additions and 15 deletions
+5
View File
@@ -28,7 +28,9 @@ BASE_URL = f"http://127.0.0.1:{PORT}"
_TEST_DB = tempfile.NamedTemporaryFile(suffix=f"_{PORT}.db", delete=False)
_TEST_DB.close()
_TEST_DATA_DIR = Path(tempfile.mkdtemp(suffix=f"_data_{PORT}"))
os.environ["DEVPLACE_DATABASE_URL"] = f"sqlite:///{_TEST_DB.name}"
os.environ["DEVPLACE_DATA_DIR"] = str(_TEST_DATA_DIR)
os.environ["SECRET_KEY"] = "test-secret-key"
os.environ["DEVPLACE_DISABLE_SERVICES"] = "1"
os.environ["DEVPLACE_RATE_LIMIT"] = "1000000"
@@ -102,6 +104,9 @@ def test_db_path():
os.unlink(_TEST_DB.name)
except OSError:
pass
import shutil
shutil.rmtree(_TEST_DATA_DIR, ignore_errors=True)
@pytest.fixture(scope="session")