Skip to content

Commit ee23e37

Browse files
committed
Add test for index.html dir for http.server
1 parent b89b070 commit ee23e37

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_httpservers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,9 @@ def test_get(self):
489489
self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
490490
response = self.request('/' + 'ThisDoesNotExist' + '/')
491491
self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
492+
os.makedirs(os.path.join(self.tempdir, 'spam', 'index.html'))
493+
response = self.request(self.base_url + '/spam/')
494+
self.check_status_and_reason(response, HTTPStatus.OK)
492495

493496
data = b"Dummy index file\r\n"
494497
with open(os.path.join(self.tempdir_name, 'index.html'), 'wb') as f:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy