From fea30408af0cf32bc1aff1fc1eb46a69233f0f31 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 5 Feb 2023 12:57:40 +0100 Subject: [PATCH] oops add helper --- changedetectionio/tests/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changedetectionio/tests/util.py b/changedetectionio/tests/util.py index a48a66b47..8319ea7c5 100644 --- a/changedetectionio/tests/util.py +++ b/changedetectionio/tests/util.py @@ -117,10 +117,11 @@ def live_server_setup(live_server): def test_changing_status_code_endpoint(): # status_code can also be overriden in a file, used for doing things that it wouldnt normally expect # (test_non_200_doesnt_trigger_change) - status_code='200' + status_code = '200' if os.path.isfile("test-endpoint-status-code.txt"): with open("test-endpoint-status-code.txt", 'r') as f: status_code = f.read().strip() + os.unlink("test-endpoint-status-code.txt") # Contents includes the status code, which will change and should not trigger a change # (Non-200 should get ignored)