Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/django/django
/ _check_referer_rejects
Method
_check_referer_rejects
tests/csrf_tests/tests.py:645–647 ·
view source on GitHub ↗
(self, mw, req)
Source
from the content-addressed store, hash-verified
643
)
644
645
def
_check_referer_rejects(self, mw, req):
646
with
self.assertRaises(RejectRequest):
647
mw._check_referer(req)
648
649
@override_settings(DEBUG=True)
650
def
test_https_no_referer(self):
Callers
9
test_https_no_referer
Method · 0.95
test_origin_malformed_host
Method · 0.95
test_https_malformed_referer
Method · 0.95
test_bad_origin_bad_domain
Method · 0.95
test_bad_origin_null_origin
Method · 0.95
test_bad_origin_bad_protocol
Method · 0.95
test_bad_origin_csrf_trusted_origin_bad_protocol
Method · 0.95
test_bad_origin_cannot_be_parsed
Method · 0.95
test_https_reject_insecure_referer
Method · 0.80
Calls
1
_check_referer
Method · 0.80
Tested by
no test coverage detected