Skip to content

Commit

Permalink
ignore favicon 404 errors in Selenium tests
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalfox committed Aug 28, 2024
1 parent d2c77a7 commit 1898b71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
from datetime import date
import os
import os.path
import sys
from subprocess import Popen, PIPE
import re


TEST_USERNAME = "sre"
Expand Down Expand Up @@ -303,6 +302,8 @@ def test_missing_resource_and_js_errors(self):
for url in urls:
self.driver.get(url)
for log in self.driver.get_log("browser"):
if re.search(r"favicon.ico.*404.*", log["message"]):
continue # ignore favicon 404 errors
self.assertNotEqual(log["level"], "SEVERE",
f"JS error on {url}\nsource {log['source']}\n{log['message']}")
# cleanup downloaded files
Expand Down

0 comments on commit 1898b71

Please sign in to comment.