🔧 fix(conftest.py): remove unused imports and commented out code
✨ feat(conftest.py): add session_getter fixture to create a blank session for testing 🔧 fix(test_custom_component.py): pass session_getter fixture to list_flows function for testing
This commit is contained in:
parent
2e7b35ddd5
commit
ddafdf31b5
2 changed files with 34 additions and 4 deletions
|
|
@ -517,13 +517,13 @@ def db(app):
|
|||
app.db.drop_all()
|
||||
|
||||
|
||||
def test_list_flows_return_type(component):
|
||||
flows = component.list_flows()
|
||||
def test_list_flows_return_type(component, session_getter):
|
||||
flows = component.list_flows(get_session=session_getter)
|
||||
assert isinstance(flows, list)
|
||||
|
||||
|
||||
def test_list_flows_flow_objects(component):
|
||||
flows = component.list_flows()
|
||||
def test_list_flows_flow_objects(component, session_getter):
|
||||
flows = component.list_flows(get_session=session_getter)
|
||||
assert all(isinstance(flow, Flow) for flow in flows)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue