mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-14 20:16:13 +00:00
Clean up after test case
This commit is contained in:
@@ -157,6 +157,9 @@ class ChangeDetectionStore:
|
|||||||
|
|
||||||
def delete(self, uuid):
|
def delete(self, uuid):
|
||||||
with self.lock:
|
with self.lock:
|
||||||
|
if uuid == 'all':
|
||||||
|
self.__data['watching'] = {}
|
||||||
|
else:
|
||||||
del (self.__data['watching'][uuid])
|
del (self.__data['watching'][uuid])
|
||||||
self.needs_write = True
|
self.needs_write = True
|
||||||
|
|
||||||
|
|||||||
@@ -119,3 +119,5 @@ def test_check_basic_change_detection_functionality(client, live_server):
|
|||||||
res = client.get(url_for("index"))
|
res = client.get(url_for("index"))
|
||||||
assert b'unviewed' in res.data
|
assert b'unviewed' in res.data
|
||||||
|
|
||||||
|
res = client.get(url_for("api_delete", uuid="all"), follow_redirects=True)
|
||||||
|
assert b'Deleted' in res.data
|
||||||
|
|||||||
@@ -124,4 +124,6 @@ def test_check_ignore_text_functionality(client, live_server):
|
|||||||
assert b'unviewed' not in res.data
|
assert b'unviewed' not in res.data
|
||||||
assert b'/test-endpoint' in res.data
|
assert b'/test-endpoint' in res.data
|
||||||
|
|
||||||
|
res = client.get(url_for("api_delete", uuid="all"), follow_redirects=True)
|
||||||
|
assert b'Deleted' in res.data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user