Skip to content

Commit

Permalink
add some assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Hhhilulu committed Oct 23, 2023
1 parent 2c0c525 commit 2e0d590
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,17 @@ def test_executor_exec_with_image_node(self, flow_folder, node_name, flow_inputs
output_relative_path_dir=("./temp"),
raise_ex=True,
)
assert "data:image/jpg;path" and "temp" in str(run_info.output)

def assert_contains_substrings(s, substrings):
for substring in substrings:
assert substring in s

substrings = ["data:image/jpg;path", "temp", "jpg"]

assert_contains_substrings(str(run_info.inputs), substrings)
assert_contains_substrings(str(run_info.output), substrings)
assert_contains_substrings(str(run_info.result), substrings)
assert_contains_substrings(str(run_info.api_calls[0]), substrings)
assert run_info.status == Status.Completed
assert isinstance(run_info.api_calls, list)
assert run_info.node == node_name
Expand Down

0 comments on commit 2e0d590

Please sign in to comment.