mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Test deleting event
This commit is contained in:
parent
12d2137b8f
commit
da5526cf23
@ -194,6 +194,21 @@ class TestHttp(unittest.TestCase):
|
|||||||
|
|
||||||
assert not event
|
assert not event
|
||||||
|
|
||||||
|
def test_delete_event(self):
|
||||||
|
app = create_app(
|
||||||
|
FrigateConfig(**self.minimal_config), self.db, None, None, None
|
||||||
|
)
|
||||||
|
id = "123456.random"
|
||||||
|
|
||||||
|
with app.test_client() as client:
|
||||||
|
_insert_mock_event(id)
|
||||||
|
event = client.get(f"/events/{id}").json
|
||||||
|
assert event
|
||||||
|
assert event["id"] == id
|
||||||
|
client.delete(f"/events/{id}")
|
||||||
|
event = client.get(f"/events/{id}").json
|
||||||
|
assert not event
|
||||||
|
|
||||||
def test_event_retention(self):
|
def test_event_retention(self):
|
||||||
app = create_app(
|
app = create_app(
|
||||||
FrigateConfig(**self.minimal_config), self.db, None, None, None
|
FrigateConfig(**self.minimal_config), self.db, None, None, None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user