2021-12-15 18:54:30 +00:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
import time
|
|
|
|
from flask import url_for
|
|
|
|
from . util import live_server_setup
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-11 13:03:42 +00:00
|
|
|
def test_trigger_functionality(client, live_server, measure_memory_usage):
|
2021-12-15 18:54:30 +00:00
|
|
|
|
|
|
|
live_server_setup(live_server)
|
|
|
|
|
|
|
|
# Give the endpoint time to spin up
|
|
|
|
time.sleep(1)
|
|
|
|
|
|
|
|
# Add our URL to the import page
|
|
|
|
res = client.post(
|
|
|
|
url_for("import_page"),
|
|
|
|
data={"urls": "https://changedetection.io"},
|
|
|
|
follow_redirects=True
|
|
|
|
)
|
|
|
|
assert b"1 Imported" in res.data
|
|
|
|
|
|
|
|
|
|
|
|
res = client.get(
|
2022-05-20 14:27:51 +00:00
|
|
|
url_for("form_clone", uuid="first"),
|
2021-12-15 18:54:30 +00:00
|
|
|
follow_redirects=True
|
|
|
|
)
|
|
|
|
|
|
|
|
assert b"Cloned." in res.data
|