Skip to content

Commit

Permalink
fixup! mozillaGH-72 Add tests for FormattedPolicyCSPMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanYoung committed May 25, 2022
1 parent 62216df commit 3bce755
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion csp/tests/test_contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def test_report_percentage():
assert 400 <= times_seen <= 600


@override_settings(CSP_DEFAULT_SRC=["{host}"])
@override_settings(
CSP_DEFAULT_SRC=["{host}"],
ALLOWED_HOSTS=["example.com"],
)
def test_formatted_policy():
request = rf.get('/', HTTP_HOST='example.com')
response = HttpResponse()
Expand Down

0 comments on commit 3bce755

Please sign in to comment.