(self)
| 578 | OpenerDirector().add_handler, NonHandler()) |
| 579 | |
| 580 | def test_no_protocol_methods(self): |
| 581 | # test the case that methods starts with handler type without the protocol |
| 582 | # like open*() or _open*(). |
| 583 | # These methods should be ignored |
| 584 | |
| 585 | o = OpenerDirector() |
| 586 | meth_spec = [ |
| 587 | ["open"], |
| 588 | ["_open"], |
| 589 | ["error"] |
| 590 | ] |
| 591 | |
| 592 | add_ordered_mock_handlers(o, meth_spec) |
| 593 | |
| 594 | self.assertEqual(len(o.handle_open), 0) |
| 595 | self.assertEqual(len(o.handle_error), 0) |
| 596 | |
| 597 | def test_badly_named_methods(self): |
| 598 | # test work-around for three methods that accidentally follow the |
nothing calls this directly
no test coverage detected