test tweaks
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled

This commit is contained in:
dgtlmoon
2026-02-01 18:26:33 +01:00
parent cf32bf5f47
commit ef310e4a67
10 changed files with 13 additions and 59 deletions
@@ -24,15 +24,8 @@ def test_fetch_webdriver_content(client, live_server, measure_memory_usage, data
)
assert b"Settings updated." in res.data
uuid = client.application.config.get('DATASTORE').add_watch(url="https://changedetection.io/ci-test.html")
# Add our URL to the import page
res = client.post(
url_for("imports.import_page"),
data={"urls": "https://changedetection.io/ci-test.html"},
follow_redirects=True
)
assert b"1 Imported" in res.data
wait_for_all_checks(client)
res = client.get(
@@ -12,13 +12,8 @@ def test_execute_custom_js(client, live_server, measure_memory_usage, datastore_
test_url = test_url.replace('localhost.localdomain', 'cdio')
test_url = test_url.replace('localhost', 'cdio')
res = client.post(
url_for("ui.ui_views.form_quick_watch_add"),
data={"url": test_url, "tags": '', 'edit_and_watch_submit_button': 'Edit > Watch'},
follow_redirects=True
)
assert b"Watch added in Paused state, saving will unpause" in res.data
uuid = client.application.config.get('DATASTORE').add_watch(url=test_url, extras={'paused': True})
res = client.post(
url_for("ui.ui_edit.edit_page", uuid=uuid, unpause_on_save=1),
@@ -10,12 +10,7 @@ def test_preferred_proxy(client, live_server, measure_memory_usage, datastore_pa
url = "http://chosen.changedetection.io"
res = client.post(
url_for("ui.ui_views.form_quick_watch_add"),
data={"url": url, "tags": '', 'edit_and_watch_submit_button': 'Edit > Watch'},
follow_redirects=True
)
assert b"Watch added in Paused state, saving will unpause" in res.data
uuid = client.application.config.get('DATASTORE').add_watch(url=url, extras={'paused': True})
wait_for_all_checks(client)
res = client.post(
@@ -11,6 +11,9 @@ def test_noproxy_option(client, live_server, measure_memory_usage, datastore_pat
# Call this URL then scan the containers that it never went through them
url = "http://noproxy.changedetection.io"
uuid = client.application.config.get('DATASTORE').add_watch(url=url, extras={'paused': True})
# Should only be available when a proxy is setup
res = client.get(
url_for("ui.ui_edit.edit_page", uuid=uuid, unpause_on_save=1))
@@ -32,11 +32,7 @@ def test_proxy_noconnect_custom(client, live_server, measure_memory_usage, datas
assert b"Settings updated." in res.data
test_url = "https://changedetection.io"
res = client.post(
url_for("ui.ui_views.form_quick_watch_add"),
data={"url": test_url, "tags": '', 'edit_and_watch_submit_button': 'Edit > Watch'},
follow_redirects=True
)
uuid = client.application.config.get('DATASTORE').add_watch(url=test_url, extras={'paused': True})
assert b"Watch added in Paused state, saving will unpause" in res.data
@@ -25,15 +25,8 @@ def test_select_custom(client, live_server, measure_memory_usage, datastore_path
assert b"Settings updated." in res.data
res = client.post(
url_for("imports.import_page"),
# Because a URL wont show in squid/proxy logs due it being SSLed
# Use plain HTTP or a specific domain-name here
data={"urls": "https://changedetection.io/CHANGELOG.txt"},
follow_redirects=True
)
assert b"1 Imported" in res.data
uuid = client.application.config.get('DATASTORE').add_watch(url='https://changedetection.io/CHANGELOG.txt', extras={'paused': True})
wait_for_all_checks(client)
res = client.get(url_for("watchlist.index"))
@@ -44,12 +44,8 @@ def test_socks5(client, live_server, measure_memory_usage, datastore_path):
test_url = test_url.replace('localhost.localdomain', 'cdio')
test_url = test_url.replace('localhost', 'cdio')
res = client.post(
url_for("ui.ui_views.form_quick_watch_add"),
data={"url": test_url, "tags": '', 'edit_and_watch_submit_button': 'Edit > Watch'},
follow_redirects=True
)
assert b"Watch added in Paused state, saving will unpause" in res.data
uuid = client.application.config.get('DATASTORE').add_watch(url=test_url, extras={'paused': True})
res = client.get(
url_for("ui.ui_edit.edit_page", uuid=uuid, unpause_on_save=1),
@@ -31,12 +31,7 @@ def test_socks5_from_proxiesjson_file(client, live_server, measure_memory_usage,
res = client.get(url_for("settings.settings_page"))
assert b'name="requests-proxy" type="radio" value="socks5proxy"' in res.data
res = client.post(
url_for("ui.ui_views.form_quick_watch_add"),
data={"url": test_url, "tags": '', 'edit_and_watch_submit_button': 'Edit > Watch'},
follow_redirects=True
)
assert b"Watch added in Paused state, saving will unpause" in res.data
uuid = client.application.config.get('DATASTORE').add_watch(url=test_url, extras={'paused': True})
res = client.get(
url_for("ui.ui_edit.edit_page", uuid=uuid, unpause_on_save=1),
@@ -377,13 +377,7 @@ def test_check_notification_email_formats_default_Text_override_HTML(client, liv
# Add a watch and trigger a HTTP POST
test_url = url_for('test_endpoint',content_type="text/html", _external=True)
res = client.post(
url_for("ui.ui_views.form_quick_watch_add"),
data={"url": test_url, "tags": 'nice one'},
follow_redirects=True
)
assert b"Watch added" in res.data
uuid = client.application.config.get('DATASTORE').add_watch(url=test_url, tag='nice one')
#################################### FIRST SITUATION, PLAIN TEXT NOTIFICATION IS WANTED BUT WE HAVE HTML IN OUR TEMPLATE AND CONTENT ##########
wait_for_all_checks(client)
@@ -93,14 +93,8 @@ def test_basic_browserstep(client, live_server, measure_memory_usage, datastore_
test_url = url_for('test_interactive_html_endpoint', _external=True)
test_url = test_url.replace('localhost.localdomain', 'cdio')
test_url = test_url.replace('localhost', 'cdio')
uuid = client.application.config.get('DATASTORE').add_watch(url=test_url, tag='nice one', extras={'paused': True})
res = client.post(
url_for("ui.ui_views.form_quick_watch_add"),
data={"url": test_url, "tags": '', 'edit_and_watch_submit_button': 'Edit > Watch'},
follow_redirects=True
)
assert b"Watch added in Paused state, saving will unpause" in res.data
res = client.post(
url_for("ui.ui_edit.edit_page", uuid=uuid, unpause_on_save=1),