fix test failing due to different error message from fake server compared to a real test server

This commit is contained in:
Fabio Pliger
2024-02-12 12:18:07 -06:00
parent 1db8163c8e
commit 0f3444e4e8

View File

@@ -471,6 +471,8 @@ class TestSupport(PyScriptTest):
Test that we capture a 404 in loading a page that does not exist.
"""
self.goto("this_url_does_not_exist.html")
assert [
"Failed to load resource: the server responded with a status of 404 (Not Found)"
] == self.console.all.lines
if self.dev_server:
error = "Failed to load resource: the server responded with a status of 404 (File not found)"
else:
error = "Failed to load resource: the server responded with a status of 404 (Not Found)"
assert [error] == self.console.all.lines