Lines Matching refs:handlers
451 on handlers. eg:
466 handlers = []
476 handlers.append(h)
478 return handlers
590 # handler returning non-None means no more handlers will be called
598 handlers = add_ordered_mock_handlers(o, meth_spec)
608 self.assertEqual(r, handlers[2])
609 calls = [(handlers[0], "http_open"), (handlers[2], "http_open")]
617 handlers = []
625 handlers.append(h)
629 # handlers called in reverse order, thanks to their sort order
630 self.assertEqual(o.calls[0][0], handlers[1])
631 self.assertEqual(o.calls[1][0], handlers[0])
640 handlers = add_ordered_mock_handlers(o, meth_spec)
644 self.assertEqual(o.calls, [(handlers[0], "http_open", (req,), {})])
657 handlers = add_ordered_mock_handlers(o, meth_spec)
661 calls = [(handlers[0], "http_open", (req,)),
662 (handlers[2], "http_error_302",
678 handlers = add_ordered_mock_handlers(o, meth_spec)
682 # processor methods are called on *all* handlers that define them,
685 (handlers[0], "http_request"), (handlers[1], "http_request"),
686 (handlers[0], "http_response"), (handlers[1], "http_response")]
1374 handlers = add_ordered_mock_handlers(o, meth_spec)
1380 self.assertEqual([(handlers[0], "http_open")],
1416 handlers = add_ordered_mock_handlers(o, meth_spec)
1422 self.assertEqual([(handlers[0], "https_open")],
1764 for h in opener.handlers))
1789 # subclasses of default handlers override default handlers
1793 # a particular case of overriding: default handlers can be passed
1802 # Issue2670: multiple handlers sharing the same base class