Commit 5333a99a authored by payno's avatar payno
Browse files

[CI] update unit test since manage channels

parent 18d280ff
......@@ -79,28 +79,28 @@ class TestNodeExecution(unittest.TestCase):
node = Node(processing_pt='pypushflow.test.utils.test_function')
res = node.execute(node.process_pt, properties={}, input_name='data',
input_data={'data': 0})
self.assertEqual(res, {'data': 2})
self.assertEqual(res, (None, {'data': 2}))
def testCase2(self):
'test that an callable class can be executed from her name'
node = Node(processing_pt='pypushflow.test.utils.ProcessingClass1')
res = node.execute(node.process_pt, properties={}, input_name='data',
input_data={'data': 0})
self.assertEqual(res, {'data': 4})
self.assertEqual(res, (None, {'data': 4}))
def testCase3(self):
"""Test that a class with handler can be executed"""
node = Node(processing_pt='pypushflow.test.utils.ProcessingClass2')
res = node.execute(node.process_pt, properties={}, input_name='data',
input_data={'data': 0})
self.assertEqual(res, {'data': 1})
self.assertEqual(res, (None, {'data': 1}))
def testCase4(self):
script = 'pypushflow.test.pythonActorTest.run'
node = Node(processing_pt=script)
res = node.execute(node.process_pt, properties={}, input_name='data',
input_data={'name': 'pythonActorTest'})
self.assertEqual(res, {'reply': 'Hello pythonActorTest!'})
self.assertEqual(res, (None, {'reply': 'Hello pythonActorTest!'}))
def suite():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment