diff --git a/iwf/tests/test_internal_channel.py b/iwf/tests/test_internal_channel.py index 727cdb4..7835497 100644 --- a/iwf/tests/test_internal_channel.py +++ b/iwf/tests/test_internal_channel.py @@ -1,5 +1,6 @@ import inspect import time +import unittest from iwf.client import Client from iwf.command_request import CommandRequest, InternalChannelCommand @@ -132,9 +133,9 @@ def get_communication_schema(self) -> CommunicationSchema: registry.add_workflow(wf) client = Client(registry) +class TestConditionalComplete(unittest.TestCase): + def test_internal_channel_workflow(self): + wf_id = f"{inspect.currentframe().f_code.co_name}-{time.time_ns()}" -def test_internal_channel_workflow(): - wf_id = f"{inspect.currentframe().f_code.co_name}-{time.time_ns()}" - - client.start_workflow(InternalChannelWorkflow, wf_id, 100, None) - client.get_simple_workflow_result_with_wait(wf_id, None) + client.start_workflow(InternalChannelWorkflow, wf_id, 100, None) + client.get_simple_workflow_result_with_wait(wf_id, None) diff --git a/iwf/type_store.py b/iwf/type_store.py index 9b86117..4657a68 100644 --- a/iwf/type_store.py +++ b/iwf/type_store.py @@ -47,7 +47,7 @@ def _do_get_type(self, name: str) -> Optional[type]: prefixes = self._prefix_to_type_store.keys() - first = next((prefix for prefix in prefixes if prefix.startswith(name)), None) + first = next((prefix for prefix in prefixes if name.startswith(prefix)), None) if first is None: return None