Skip to content

Commit

Permalink
Merge pull request #2861 from hmpf/stop-hiding-500
Browse files Browse the repository at this point in the history
Preserve 500-error in test
  • Loading branch information
hmpf authored Mar 7, 2024
2 parents 6e728fc + 90f3652 commit 9cfd877
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration/web/crawler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ def test_page_should_be_valid_html(page):

def should_validate(page: Page):
"""Returns True if page is eligible for HTML validation, False if not"""
if not page.content_type or 'html' not in page.content_type.lower():
if (
page.response == 500
or not page.content_type
or 'html' not in page.content_type.lower()
):
return False
path = normalize_path(page.url)
for blacklisted_path in TIDY_BLACKLIST:
Expand Down

0 comments on commit 9cfd877

Please sign in to comment.