Skip to content

Commit

Permalink
test fix ignore csrf
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxJamie16 committed Nov 14, 2024
1 parent 439bd77 commit 3772382
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/unit/core/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def test_multiple_modules(domestic_homepage, client, user, get_response):

request = HttpRequest()
request.user = user

request.META['CSRF_COOKIE'] = 'fake-csrf-token'
request._dont_enforce_csrf_checks = True

middleware = SessionMiddleware(get_response)
middleware.process_request(request)
request.session.save()
Expand Down Expand Up @@ -185,6 +189,10 @@ def test_placeholders_do_not_get_counted(domestic_homepage, client, user, get_re

request = HttpRequest()
request.user = user

request.META['CSRF_COOKIE'] = 'fake-csrf-token'
request._dont_enforce_csrf_checks = True

middleware = SessionMiddleware(get_response)
middleware.process_request(request)
request.session.save()
Expand Down

0 comments on commit 3772382

Please sign in to comment.