Skip to content

Commit 05f2bee

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5f3b1b1 commit 05f2bee

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

cheroot/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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),

cheroot/test/test_server.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)