@@ -797,16 +797,17 @@ def test_ajax_refresh(self):
797797
798798
799799@unittest .skipUnless (
800- AsyncRequestFactory is not None , "Test valid only for django with async requests"
800+ AsyncRequestFactory is not None , "Test valid only for django with async requests"
801801)
802802@override_settings (DEBUG = True )
803803class DebugToolbarAsyncTestCase (BaseTestCase ):
804-
805804 @classmethod
806805 def setUpClass (cls ):
807806 super ().setUpClass ()
808807 cls .async_rf = AsyncRequestFactory ()
809- cls .simple_get_response = lambda * args , ** kwargs : HttpResponse ("<html><body></body></html>" )
808+ cls .simple_get_response = lambda * args , ** kwargs : HttpResponse (
809+ "<html><body></body></html>"
810+ )
810811 cls ._default_stdout = sys .stdout
811812
812813 def setUp (self ):
@@ -823,14 +824,16 @@ def test_do_not_render_toolbar_if_it_was_async_request(self):
823824 captured_output = io .StringIO ()
824825 sys .stdout = captured_output
825826
826- request = self .async_rf .get ('/' )
827+ request = self .async_rf .get ("/" )
827828 response = DebugToolbarMiddleware (self .simple_get_response )(request )
828829
829830 self .assertEqual (response .content , b"<html><body></body></html>" )
830831
831832 def test_prints_warning_async_is_not_supported (self ):
832- request = self .async_rf .get ('/' )
833+ request = self .async_rf .get ("/" )
833834 DebugToolbarMiddleware (self .simple_get_response )(request )
834835
835- assert self .captured_output .getvalue () == "----------\n Be caution, django-debug-toolbar does not support async requests!\n ----------\n "
836-
836+ assert (
837+ self .captured_output .getvalue ()
838+ == "----------\n Be caution, django-debug-toolbar does not support async requests!\n ----------\n "
839+ )
0 commit comments