Initial commit — Stupid Simple Network Inventory
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>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
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")
|
||||
Reference in New Issue
Block a user