From 1a0a47827ed97eca00349ba16d77665c8da3854c Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Fri, 17 May 2024 19:20:18 +0200 Subject: [PATCH] And check for the field --- changedetectionio/tests/test_request.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/changedetectionio/tests/test_request.py b/changedetectionio/tests/test_request.py index 80a10b42..cfbc7825 100644 --- a/changedetectionio/tests/test_request.py +++ b/changedetectionio/tests/test_request.py @@ -281,7 +281,15 @@ def test_headers_textfile_in_request(client, live_server): ) assert b'Settings updated' in res.data - print("TEST URL IS ", test_url) + res = client.get(url_for("settings_page")) + + # Only when some kind of real browser is setup + if os.getenv('PLAYWRIGHT_DRIVER_URL'): + assert b'requests-default_ua-html_webdriver' in res.data + + # Field should always be there + assert b"requests-default_ua-html_requests" in res.data + # Add the test URL twice, we will check res = client.post( url_for("import_page"),