MCPcopy
hub / github.com/django/django / test_request

Method test_request

tests/sites_tests/tests.py:359–364  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

357
358class MiddlewareTest(TestCase):
359 def test_request(self):
360 def get_response(request):
361 return HttpResponse(str(request.site.id))
362
363 response = CurrentSiteMiddleware(get_response)(HttpRequest())
364 self.assertContains(response, settings.SITE_ID)

Callers

nothing calls this directly

Calls 3

HttpRequestClass · 0.90
assertContainsMethod · 0.80

Tested by

no test coverage detected