File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1876,7 +1876,7 @@ def _serve_unservicable(self):
18761876 return
18771877 request = HTTPRequest (self , conn )
18781878 try :
1879- request .simple_response (" 503 Service Unavailable" )
1879+ request .simple_response (' 503 Service Unavailable' )
18801880 except Exception as ex :
18811881 self .server .error_log (
18821882 repr (ex ),
Original file line number Diff line number Diff line change @@ -576,12 +576,15 @@ def test_overload_results_in_503(request):
576576 """A server that can't keep up with requests returns a 503 HTTP error."""
577577 httpserver = HTTPServer (
578578 bind_addr = (ANY_INTERFACE_IPV4 , EPHEMERAL_PORT ),
579- gateway = Gateway
579+ gateway = Gateway ,
580580 )
581581 # Can only handle on request in parallel:
582582 httpserver .requests = ThreadPool (
583- min = 1 , max = 1 , accepted_queue_size = 1 ,
584- accepted_queue_timeout = 0 , server = httpserver
583+ min = 1 ,
584+ max = 1 ,
585+ accepted_queue_size = 1 ,
586+ accepted_queue_timeout = 0 ,
587+ server = httpserver ,
585588 )
586589
587590 httpserver .prepare ()
@@ -598,5 +601,5 @@ def test_overload_results_in_503(request):
598601 sock2 = socket .socket ()
599602 sock2 .connect ((host , port ))
600603
601- response = requests .get (f" http://{ host } :{ port } " , timeout = 5 )
604+ response = requests .get (f' http://{ host } :{ port } ' , timeout = 5 )
602605 assert response .status_code == 503
You can’t perform that action at this time.
0 commit comments