Skip to content

Commit d7926da

Browse files
committed
Fail tests if browser errors found on load
1 parent cae763c commit d7926da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

nested_admin/tests/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ def initialize_page(self):
8383
six.reraise(*self.server_exc_info)
8484

8585
super(BaseNestedAdminTestCase, self).initialize_page()
86+
87+
browser_errors = [e for e in self.selenium.get_log('browser')
88+
if 'favicon' not in e['message']]
89+
if len(browser_errors) > 0:
90+
logger.error("Found browser errors: %s" % json.dumps(browser_errors, indent=4))
91+
8692
# Store last mousemove event, so we can track the mouse position
8793
self.selenium.execute_script("""
8894
if (window.DJNesting) {

0 commit comments

Comments
 (0)