mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
server: implement user authentication (none by default)
This commit is contained in:
16
server/tests/conftest.py
Normal file
16
server/tests/conftest.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(scope="function", autouse=True)
|
||||
@pytest.mark.asyncio
|
||||
async def setup_database():
|
||||
from reflector.settings import settings
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
||||
with NamedTemporaryFile() as f:
|
||||
settings.DATABASE_URL = f"sqlite:///{f.name}"
|
||||
from reflector.db import engine, metadata
|
||||
|
||||
metadata.create_all(bind=engine)
|
||||
|
||||
yield
|
||||
Reference in New Issue
Block a user