Skip to content

Commit 819491f

Browse files
committed
tests all pass
1 parent 2ba2aee commit 819491f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/http/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,8 +900,8 @@ def guess_type(self, path):
900900
>>> testhandler.default_content_type = 'nonesuch/nonesuch'
901901
>>> testhandler.guess_type('/this/should/give/default')
902902
'nonesuch/nonesuch'
903-
>>> # check short-circuiting works
904-
>>> mimetypes = type('', (), {
903+
>>> # check short-circuiting works using mock mimetypes.guess_type
904+
>>> sys.modules[__name__].mimetypes = type('', (), {
905905
... 'guess_type': lambda x: (print('foo'), print('bar'))
906906
... })
907907
>>> testhandler.guess_type('/should/show/foo/bar/then/default')

0 commit comments

Comments
 (0)