mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-08 09:05:36 +00:00
29 lines
561 B
Python
29 lines
561 B
Python
#!/usr/bin/python3
|
|
|
|
import time
|
|
|
|
from flask import url_for
|
|
|
|
from .util import live_server_setup
|
|
|
|
|
|
def test_import(client, live_server):
|
|
|
|
live_server_setup(live_server)
|
|
|
|
# Give the endpoint time to spin up
|
|
time.sleep(1)
|
|
|
|
res = client.post(
|
|
url_for("import_page"),
|
|
data={
|
|
"urls": """https://example.com
|
|
https://example.com tag1
|
|
https://example.com tag1, other tag"""
|
|
},
|
|
follow_redirects=True,
|
|
)
|
|
assert b"3 Imported" in res.data
|
|
assert b"tag1" in res.data
|
|
assert b"other tag" in res.data
|