This commit is contained in:
@@ -17,9 +17,9 @@ def action(params):
|
|||||||
class TestDispatcher(unittest.TestCase):
|
class TestDispatcher(unittest.TestCase):
|
||||||
def test_dispatcher(self):
|
def test_dispatcher(self):
|
||||||
dispatcher = Dispatcher()
|
dispatcher = Dispatcher()
|
||||||
params ={'param': True}
|
params ={'param': 'value'}
|
||||||
dispatcher.register('name', comparator, action)
|
dispatcher.register('name', comparator, action)
|
||||||
method = dispatcher(params)
|
method = dispatcher(params)
|
||||||
print(method)
|
print(method)
|
||||||
result = method(params)
|
result = method(params)
|
||||||
self.assertTrue(result)
|
self.assertEqual(result, 'value')
|
||||||
|
|||||||
Reference in New Issue
Block a user