Remove Enum warnings from test_httpservers (GH-25844)

This commit is contained in:
Shreyan Avigyan 2021-05-04 00:57:47 +05:30 committed by GitHub
parent 80a2a4ed7d
commit d3b9134ebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -259,7 +259,7 @@ class BaseHTTPServerTestCase(BaseTestCase):
for code in (HTTPStatus.NO_CONTENT, HTTPStatus.NOT_MODIFIED,
HTTPStatus.PROCESSING, HTTPStatus.RESET_CONTENT,
HTTPStatus.SWITCHING_PROTOCOLS):
self.con.request('SEND_ERROR', '/{}'.format(code))
self.con.request('SEND_ERROR', '/{:d}'.format(code))
res = self.con.getresponse()
self.assertEqual(code, res.status)
self.assertEqual(None, res.getheader('Content-Length'))
@ -276,7 +276,7 @@ class BaseHTTPServerTestCase(BaseTestCase):
for code in (HTTPStatus.OK, HTTPStatus.NO_CONTENT,
HTTPStatus.NOT_MODIFIED, HTTPStatus.RESET_CONTENT,
HTTPStatus.SWITCHING_PROTOCOLS):
self.con.request('HEAD', '/{}'.format(code))
self.con.request('HEAD', '/{:d}'.format(code))
res = self.con.getresponse()
self.assertEqual(code, res.status)
if code == HTTPStatus.OK: