|
|
@ -3,7 +3,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
from flask import url_for
|
|
|
|
from flask import url_for
|
|
|
|
from .util import live_server_setup
|
|
|
|
from .util import live_server_setup, wait_for_all_checks
|
|
|
|
import pytest
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -27,9 +27,6 @@ def set_html_response():
|
|
|
|
def test_check_encoding_detection(client, live_server):
|
|
|
|
def test_check_encoding_detection(client, live_server):
|
|
|
|
set_html_response()
|
|
|
|
set_html_response()
|
|
|
|
|
|
|
|
|
|
|
|
# Give the endpoint time to spin up
|
|
|
|
|
|
|
|
time.sleep(1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add our URL to the import page
|
|
|
|
# Add our URL to the import page
|
|
|
|
test_url = url_for('test_endpoint', content_type="text/html", _external=True)
|
|
|
|
test_url = url_for('test_endpoint', content_type="text/html", _external=True)
|
|
|
|
client.post(
|
|
|
|
client.post(
|
|
|
@ -39,7 +36,7 @@ def test_check_encoding_detection(client, live_server):
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Give the thread time to pick it up
|
|
|
|
# Give the thread time to pick it up
|
|
|
|
time.sleep(2)
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
|
|
|
|
|
|
|
|
res = client.get(
|
|
|
|
res = client.get(
|
|
|
|
url_for("preview_page", uuid="first"),
|
|
|
|
url_for("preview_page", uuid="first"),
|
|
|
@ -56,9 +53,6 @@ def test_check_encoding_detection(client, live_server):
|
|
|
|
def test_check_encoding_detection_missing_content_type_header(client, live_server):
|
|
|
|
def test_check_encoding_detection_missing_content_type_header(client, live_server):
|
|
|
|
set_html_response()
|
|
|
|
set_html_response()
|
|
|
|
|
|
|
|
|
|
|
|
# Give the endpoint time to spin up
|
|
|
|
|
|
|
|
time.sleep(1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add our URL to the import page
|
|
|
|
# Add our URL to the import page
|
|
|
|
test_url = url_for('test_endpoint', _external=True)
|
|
|
|
test_url = url_for('test_endpoint', _external=True)
|
|
|
|
client.post(
|
|
|
|
client.post(
|
|
|
@ -67,8 +61,7 @@ def test_check_encoding_detection_missing_content_type_header(client, live_serve
|
|
|
|
follow_redirects=True
|
|
|
|
follow_redirects=True
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Give the thread time to pick it up
|
|
|
|
wait_for_all_checks(client)
|
|
|
|
time.sleep(2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = client.get(
|
|
|
|
res = client.get(
|
|
|
|
url_for("preview_page", uuid="first"),
|
|
|
|
url_for("preview_page", uuid="first"),
|
|
|
|