mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-11-29 12:53:20 +00:00
Some checks failed
Build and push containers / metadata (push) Has been cancelled
Build and push containers / build-push-containers (push) Has been cancelled
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
37 lines
1.2 KiB
Python
37 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
|
|
import os
|
|
from flask import url_for
|
|
from ..util import live_server_setup, wait_for_all_checks
|
|
|
|
|
|
def test_preferred_proxy(client, live_server, measure_memory_usage):
|
|
# live_server_setup(live_server) # Setup on conftest per function
|
|
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
|
|
|
|
wait_for_all_checks(client)
|
|
res = client.post(
|
|
url_for("ui.ui_edit.edit_page", uuid="first", unpause_on_save=1),
|
|
data={
|
|
"include_filters": "",
|
|
"fetch_backend": 'html_webdriver' if os.getenv('PLAYWRIGHT_DRIVER_URL') else 'html_requests',
|
|
"headers": "",
|
|
"proxy": "proxy-two",
|
|
"tags": "",
|
|
"url": url,
|
|
"time_between_check_use_default": "y",
|
|
},
|
|
follow_redirects=True
|
|
)
|
|
assert b"unpaused" in res.data
|
|
wait_for_all_checks(client)
|
|
# Now the request should appear in the second-squid logs
|