Skip to content

Commit

Permalink
test: fix 单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshuaikang committed Sep 7, 2023
1 parent 902a724 commit 1c76046
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from gcloud import err_code
from gcloud.taskflow3.models import TaskFlowInstance

from gcloud.tests.mock import * # noqa
from gcloud.tests.mock_settings import * # noqa

Expand Down Expand Up @@ -97,6 +96,7 @@ def test_include_data_is_false(self):
subprocess_stack=subprocess_stack,
pipeline_instance=taskflow.pipeline_instance,
loop=loop,
subprocess_simple_inputs=False,
)
self.assertEqual(detail, {"code": 0, "data": {}, "message": "", "result": True})

Expand Down Expand Up @@ -138,13 +138,15 @@ def test_success(self):
pipeline_instance=taskflow.pipeline_instance,
loop=loop,
project_id="project_id",
subprocess_simple_inputs=False,
)
dispatcher.get_node_detail.assert_called_once_with(
username=username,
component_code=component_code,
subprocess_stack=subprocess_stack,
pipeline_instance=taskflow.pipeline_instance,
loop=loop,
subprocess_simple_inputs=False,
)
self.assertEqual(
detail, {"code": 0, "data": {"data": "data", "detail": "detail"}, "message": "", "result": True}
Expand Down

0 comments on commit 1c76046

Please sign in to comment.