From 8d008bcfafb3275ed7a1ea8757ea5eb4c00b3e81 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Thu, 8 Apr 2021 18:18:16 +0100 Subject: [PATCH] Ignore noise from warnings in test_check_invalid_base_form_class --- wagtail/admin/tests/test_edit_handlers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)