Refs #31928 -- Added various middlewares tests for detecting when get_response is coroutine.
This commit is contained in:
parent
825ce75fae
commit
225261b701
|
@ -77,12 +77,7 @@ class MiddlewareMixinTests(SimpleTestCase):
|
||||||
def sync_get_response(request):
|
def sync_get_response(request):
|
||||||
return HttpResponse()
|
return HttpResponse()
|
||||||
|
|
||||||
for middleware in [
|
for middleware in self.middlewares:
|
||||||
CacheMiddleware,
|
|
||||||
FetchFromCacheMiddleware,
|
|
||||||
UpdateCacheMiddleware,
|
|
||||||
SecurityMiddleware,
|
|
||||||
]:
|
|
||||||
with self.subTest(middleware=middleware.__qualname__):
|
with self.subTest(middleware=middleware.__qualname__):
|
||||||
# Middleware appears as coroutine if get_function is
|
# Middleware appears as coroutine if get_function is
|
||||||
# a coroutine.
|
# a coroutine.
|
||||||
|
|
Loading…
Reference in New Issue