Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
workflow
pypushflow
Commits
5333a99a
Commit
5333a99a
authored
Aug 03, 2020
by
payno
Browse files
[CI] update unit test since manage channels
parent
18d280ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
pypushflow/test/test_representation.py
View file @
5333a99a
...
...
@@ -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
():
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment