Skip to content

Commit 573a87b

Browse files
salty-ivytim-schilling
authored andcommitted
toggle debug to true so that debug middleware make a complete run
1 parent c5cdd70 commit 573a87b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: tests/test_middleware_compatibility.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from django.http import HttpResponse
4-
from django.test import AsyncRequestFactory, RequestFactory, TestCase
4+
from django.test import AsyncRequestFactory, RequestFactory, TestCase, override_settings
55

66
from debug_toolbar.middleware import DebugToolbarMiddleware
77

@@ -11,6 +11,7 @@ def setUp(self):
1111
self.factory = RequestFactory()
1212
self.async_factory = AsyncRequestFactory()
1313

14+
@override_settings(DEBUG=True)
1415
def test_sync_mode(self):
1516
"""
1617
test middlware switches to sync (__call__) based on get_response type
@@ -26,6 +27,7 @@ def test_sync_mode(self):
2627
response = middleware(request)
2728
self.assertEqual(response.status_code, 200)
2829

30+
@override_settings(DEBUG=True)
2931
async def test_async_mode(self):
3032
"""
3133
test middlware switches to async (__acall__) based on get_response type

0 commit comments

Comments
 (0)