🎨 Auto format

This commit is contained in:
pre-commit-ci-lite[bot] 2026-03-14 06:13:14 +00:00 committed by GitHub
parent 2ea91122c9
commit cb0c5f89af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 9 deletions

View File

@ -33,9 +33,7 @@ def test_warn_when_response_background_overwrites_injected_tasks():
resp = client.get("/")
assert resp.status_code == 200
bg_warnings = [
w for w in caught if "background" in str(w.message).lower()
]
bg_warnings = [w for w in caught if "background" in str(w.message).lower()]
assert len(bg_warnings) == 1
assert issubclass(bg_warnings[0].category, UserWarning)
@ -61,9 +59,7 @@ def test_no_warn_when_response_has_no_background():
resp = client.get("/")
assert resp.status_code == 200
bg_warnings = [
w for w in caught if "background" in str(w.message).lower()
]
bg_warnings = [w for w in caught if "background" in str(w.message).lower()]
assert len(bg_warnings) == 0
# The injected task should have run
assert executed == [True]
@ -89,8 +85,6 @@ def test_no_warn_when_no_injected_background_tasks():
resp = client.get("/")
assert resp.status_code == 200
bg_warnings = [
w for w in caught if "background" in str(w.message).lower()
]
bg_warnings = [w for w in caught if "background" in str(w.message).lower()]
assert len(bg_warnings) == 0
assert executed == [True]