Use the same pattern for all tests

This commit is contained in:
Rui Alves 2024-09-21 15:40:32 +01:00
parent 89b103b3a2
commit 2dce0448f6

View File

@ -363,7 +363,7 @@ class TestHttp(unittest.TestCase):
assert config["cameras"]["front_door"]
def test_recordings(self):
app_fastapi = create_fastapi_app(
app = create_fastapi_app(
FrigateConfig(**self.minimal_config).runtime_config(),
None,
None,
@ -372,10 +372,10 @@ class TestHttp(unittest.TestCase):
PlusApi(),
None,
)
client = TestClient(app_fastapi)
id = "123456.random"
_insert_mock_recording(id)
with TestClient(app) as client:
response = client.get("/media/camera/front_door/recordings")
assert response.status_code == 200
recording = response.json()