We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5034413 commit c475fecCopy full SHA for c475fec
1 file changed
Lib/test/test_httpservers.py
@@ -1448,6 +1448,16 @@ def test_protocol_flag(self, mock_func):
1448
mock_func.assert_called_once_with(**call_args)
1449
mock_func.reset_mock()
1450
1451
+ @mock.patch('http.server.test')
1452
+ def test_content_type_flag(self, mock_func):
1453
+ content_types = ['text/html', 'text/plain', 'application/json']
1454
+ for content_type in content_types:
1455
+ with self.subTest(content_type=content_type):
1456
+ self.invoke_httpd('--content-type', content_type)
1457
+ call_args = self.args | dict(content_type=content_type)
1458
+ mock_func.assert_called_once_with(**call_args)
1459
+ mock_func.reset_mock()
1460
+
1461
@unittest.skipIf(ssl is None, "requires ssl")
1462
@mock.patch('http.server.test')
1463
def test_tls_cert_and_key_flags(self, mock_func):
0 commit comments