mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Use the same pattern for all tests
This commit is contained in:
parent
89b103b3a2
commit
2dce0448f6
@ -363,7 +363,7 @@ class TestHttp(unittest.TestCase):
|
|||||||
assert config["cameras"]["front_door"]
|
assert config["cameras"]["front_door"]
|
||||||
|
|
||||||
def test_recordings(self):
|
def test_recordings(self):
|
||||||
app_fastapi = create_fastapi_app(
|
app = create_fastapi_app(
|
||||||
FrigateConfig(**self.minimal_config).runtime_config(),
|
FrigateConfig(**self.minimal_config).runtime_config(),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
@ -372,10 +372,10 @@ class TestHttp(unittest.TestCase):
|
|||||||
PlusApi(),
|
PlusApi(),
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
client = TestClient(app_fastapi)
|
|
||||||
id = "123456.random"
|
id = "123456.random"
|
||||||
|
|
||||||
_insert_mock_recording(id)
|
_insert_mock_recording(id)
|
||||||
|
with TestClient(app) as client:
|
||||||
response = client.get("/media/camera/front_door/recordings")
|
response = client.get("/media/camera/front_door/recordings")
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
recording = response.json()
|
recording = response.json()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user