|
|
@ -59,6 +59,8 @@ def test_http_error_handler(client, live_server):
|
|
|
|
_runner_test_http_errors(client, live_server, 404, 'Page not found')
|
|
|
|
_runner_test_http_errors(client, live_server, 404, 'Page not found')
|
|
|
|
_runner_test_http_errors(client, live_server, 500, '(Internal server Error) received')
|
|
|
|
_runner_test_http_errors(client, live_server, 500, '(Internal server Error) received')
|
|
|
|
_runner_test_http_errors(client, live_server, 400, 'Error - Request returned a HTTP error code 400')
|
|
|
|
_runner_test_http_errors(client, live_server, 400, 'Error - Request returned a HTTP error code 400')
|
|
|
|
|
|
|
|
res = client.get(url_for("form_delete", uuid="all"), follow_redirects=True)
|
|
|
|
|
|
|
|
assert b'Deleted' in res.data
|
|
|
|
|
|
|
|
|
|
|
|
# Just to be sure error text is properly handled
|
|
|
|
# Just to be sure error text is properly handled
|
|
|
|
def test_DNS_errors(client, live_server):
|
|
|
|
def test_DNS_errors(client, live_server):
|
|
|
@ -81,6 +83,8 @@ def test_DNS_errors(client, live_server):
|
|
|
|
assert found_name_resolution_error
|
|
|
|
assert found_name_resolution_error
|
|
|
|
# Should always record that we tried
|
|
|
|
# Should always record that we tried
|
|
|
|
assert bytes("just now".encode('utf-8')) in res.data
|
|
|
|
assert bytes("just now".encode('utf-8')) in res.data
|
|
|
|
|
|
|
|
res = client.get(url_for("form_delete", uuid="all"), follow_redirects=True)
|
|
|
|
|
|
|
|
assert b'Deleted' in res.data
|
|
|
|
|
|
|
|
|
|
|
|
# Re 1513
|
|
|
|
# Re 1513
|
|
|
|
def test_low_level_errors_clear_correctly(client, live_server):
|
|
|
|
def test_low_level_errors_clear_correctly(client, live_server):
|
|
|
@ -121,3 +125,6 @@ def test_low_level_errors_clear_correctly(client, live_server):
|
|
|
|
res = client.get(url_for("index"))
|
|
|
|
res = client.get(url_for("index"))
|
|
|
|
found_name_resolution_error = b"Temporary failure in name resolution" in res.data or b"Name or service not known" in res.data
|
|
|
|
found_name_resolution_error = b"Temporary failure in name resolution" in res.data or b"Name or service not known" in res.data
|
|
|
|
assert not found_name_resolution_error
|
|
|
|
assert not found_name_resolution_error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
res = client.get(url_for("form_delete", uuid="all"), follow_redirects=True)
|
|
|
|
|
|
|
|
assert b'Deleted' in res.data
|
|
|
|