Add test for get_handler_by_type()
This commit is contained in:
parent
088b555ae0
commit
19652f165e
1 changed files with 7 additions and 0 deletions
|
@ -159,6 +159,13 @@ class TestProcessor(unittest.TestCase):
|
|||
# Passes check
|
||||
Processor(EventHandlerWithRequiredEvent()).process([required_mock_event, mock_event])
|
||||
|
||||
def test_get_handler_by_type(self) -> None:
|
||||
handler1 = StubHandler1()
|
||||
handler2 = StubHandler2()
|
||||
processor = Processor(handler1, handler2)
|
||||
result = processor.get_handler_by_type(StubHandler1)
|
||||
self.assertTrue(result is handler1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue