diff --git a/wagtail/admin/tests/test_edit_handlers.py b/wagtail/admin/tests/test_edit_handlers.py index 10d3d7c0e4..fe0a18f00e 100644 --- a/wagtail/admin/tests/test_edit_handlers.py +++ b/wagtail/admin/tests/test_edit_handlers.py @@ -203,9 +203,8 @@ class TestPageEditHandlers(TestCase): with mock.patch.object(ValidatedPage, 'base_form_class', new=BadFormClass): errors = checks.run_checks() - # ignore CSS loading errors (to avoid spurious failures on CI servers that - # don't build the CSS) - errors = [e for e in errors if e.id != 'wagtailadmin.W001'] + # Only look at errors (e.g. ignore warnings about CSS not being built) + errors = [e for e in errors if e.level >= checks.ERROR] # Errors may appear out of order, so sort them by id errors.sort(key=lambda e: e.id)