test improvements

550-visual-selector
dgtlmoon 3 years ago
parent 766a7ea746
commit de1739dd09

@ -34,7 +34,7 @@ def test_fetch_webdriver_content(client, live_server):
res = client.get(url_for("index")) res = client.get(url_for("index"))
if not b'Checking now' in res.data: if not b'Checking now' in res.data:
break break
logging.getLogger().warning("Waiting for WebDriver to complete..") logging.getLogger().info("Waiting for check to not say 'Checking now'..")
time.sleep(3) time.sleep(3)
attempt += 1 attempt += 1
@ -43,7 +43,6 @@ def test_fetch_webdriver_content(client, live_server):
url_for("preview_page", uuid="first"), url_for("preview_page", uuid="first"),
follow_redirects=True follow_redirects=True
) )
with open('/tmp/fuck.html', 'wb') as f: logging.getLogger().info("Looking for correct fetched HTML (text) from server")
f.write(res.data)
assert b'cool it works' in res.data assert b'cool it works' in res.data
Loading…
Cancel
Save