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):
1876
1876
return
1877
1877
request = HTTPRequest (self , conn )
1878
1878
try :
1879
- request .simple_response (" 503 Service Unavailable" )
1879
+ request .simple_response (' 503 Service Unavailable' )
1880
1880
except Exception as ex :
1881
1881
self .server .error_log (
1882
1882
repr (ex ),
Original file line number Diff line number Diff line change @@ -576,12 +576,15 @@ def test_overload_results_in_503(request):
576
576
"""A server that can't keep up with requests returns a 503 HTTP error."""
577
577
httpserver = HTTPServer (
578
578
bind_addr = (ANY_INTERFACE_IPV4 , EPHEMERAL_PORT ),
579
- gateway = Gateway
579
+ gateway = Gateway ,
580
580
)
581
581
# Can only handle on request in parallel:
582
582
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 ,
585
588
)
586
589
587
590
httpserver .prepare ()
@@ -598,5 +601,5 @@ def test_overload_results_in_503(request):
598
601
sock2 = socket .socket ()
599
602
sock2 .connect ((host , port ))
600
603
601
- response = requests .get (f" http://{ host } :{ port } " , timeout = 5 )
604
+ response = requests .get (f' http://{ host } :{ port } ' , timeout = 5 )
602
605
assert response .status_code == 503
You can’t perform that action at this time.
0 commit comments