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 85e3e09 commit d87fcf9Copy full SHA for d87fcf9
pytest_httpserver/httpserver.py
@@ -972,11 +972,12 @@ def clear_all_handlers(self):
972
self.oneshot_handlers = RequestHandlerList()
973
self.handlers = RequestHandlerList()
974
975
- def expect(self, matcher: RequestMatcher) -> RequestHandler:
+ def expect(self, matcher: RequestMatcher, handler_type: HandlerType = HandlerType.PERMANENT) -> RequestHandler:
976
"""
977
Create and register a request handler.
978
979
:param matcher: :py:class:`RequestMatcher` used to match requests.
980
+ :param handler_type: type of handler
981
982
request_handler = RequestHandler(matcher)
983
if handler_type == HandlerType.PERMANENT:
0 commit comments