mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-07 09:13:04 +02:00
Reorganize for great victory and move to blob for payload hasg
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import pytest
|
||||
from fastapi import HTTPException
|
||||
|
||||
from app.database import Database
|
||||
from app.models import AppSettings, BotConfig
|
||||
from app.repository import AppSettingsRepository
|
||||
from app.routers.settings import (
|
||||
@@ -16,24 +15,6 @@ from app.routers.settings import (
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def test_db():
|
||||
"""Create an in-memory test database with schema + migrations."""
|
||||
import app.repository as repo_module
|
||||
|
||||
db = Database(":memory:")
|
||||
await db.connect()
|
||||
|
||||
original_db = repo_module.db
|
||||
repo_module.db = db
|
||||
|
||||
try:
|
||||
yield db
|
||||
finally:
|
||||
repo_module.db = original_db
|
||||
await db.disconnect()
|
||||
|
||||
|
||||
class TestUpdateSettings:
|
||||
@pytest.mark.asyncio
|
||||
async def test_forwards_only_provided_fields(self, test_db):
|
||||
|
||||
Reference in New Issue
Block a user