Обновить tests/test_dispatcher.py
Тест / Tester (push) Successful in 2s

This commit is contained in:
2026-04-24 22:23:10 +03:00
parent 7eebb72bff
commit 4f93e9b18c
+11 -1
View File
@@ -24,4 +24,14 @@ class TestDispatcher(unittest.TestCase):
self.assertEqual(result, 'value')
def test_sub(self):
pass
dispatcher = Dispatcher()
params ={'param': 'value'}
sub = Dispatcher()
sub.register('name', comparator, action)
dispatcher.register('name', comparator, sub)
method = dispatcher(params)
result = method(params)
sub_result = result(params)
self.assertEqual(sub_result, 'value')