ref: Make list_flows async (#5222)
* Make list_flows async * Keep sync list_flows method for backward compatibility
This commit is contained in:
parent
d73bf214a8
commit
2e19403660
8 changed files with 42 additions and 38 deletions
|
|
@ -20,13 +20,13 @@ def component(
|
|||
)
|
||||
|
||||
|
||||
def test_list_flows_flow_objects(component):
|
||||
flows = component.list_flows()
|
||||
async def test_list_flows_flow_objects(component):
|
||||
flows = await component.alist_flows()
|
||||
are_flows = [isinstance(flow, Data) for flow in flows]
|
||||
flow_types = [type(flow) for flow in flows]
|
||||
assert all(are_flows), f"Expected all flows to be Data objects, got {flow_types}"
|
||||
|
||||
|
||||
def test_list_flows_return_type(component):
|
||||
flows = component.list_flows()
|
||||
async def test_list_flows_return_type(component):
|
||||
flows = await component.alist_flows()
|
||||
assert isinstance(flows, list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue