88cf6458d0
Application web d'inventaire réseau manuel avec FastAPI, Vue 3 et Docker. Inclut l'authentification JWT, la découverte ICMP, et la topologie en cards CSS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
427 B
Python
13 lines
427 B
Python
"""
|
|
Configures a fresh in-memory SQLite database for every test session.
|
|
DATABASE_URL must be set before any app module is imported.
|
|
"""
|
|
import os
|
|
import tempfile
|
|
|
|
# Must be set before importing database or main
|
|
_tmpdb = tempfile.NamedTemporaryFile(suffix=".db", delete=False)
|
|
_tmpdb.close()
|
|
os.environ["DATABASE_URL"] = f"sqlite:///{_tmpdb.name}"
|
|
os.environ.setdefault("SECRET_KEY", "test-only-secret-key-not-for-production")
|