Ignore noise from warnings in test_check_invalid_base_form_class

pull/7033/head
Matt Westcott 2021-04-08 18:18:16 +01:00
rodzic b455c659b7
commit 8d008bcfaf
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -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)