Skip to content
Snippets Groups Projects
Commit 31d304dd authored by Nathan Hertz's avatar Nathan Hertz
Browse files

Added persistence tests

parent f0a95218
No related branches found
No related tags found
No related merge requests found
from schema import create_session
from workspaces.capability_interfaces import CapabilityInfoIF
from workspaces.schema import Workflow
from workspaces.services import WorkflowInfo, CapabilityInfo
from workspaces.workflow_interfaces import WorkflowInfoIF
......@@ -17,6 +18,14 @@ def get_capability_info() -> CapabilityInfoIF:
return CapabilityInfo(SESSION)
def test_get_requests_for_capability():
"""Ensure we can get all requests for a certain capability"""
info = get_capability_info()
info.create_capability("test_get_requests", None, 0)
info.create_capability_request("test_get_requests")
assert len(info.requests_for_capability("test_get_requests")) > 0
def test_persisting_workflow_request():
"""Ensure we can persist a workflow request"""
info = get_workflow_info()
......@@ -32,6 +41,14 @@ def test_reading_workflows():
assert len(workflows) > 0
def test_reading_workflow_requests():
"""Ensure we can get workflow requests"""
info = get_workflow_info()
workflow_requests = info.all_workflow_requests()
print(workflow_requests)
assert len(workflow_requests) > 0
def test_reading_capability():
"""Ensure we can get a capability"""
info = get_capability_info()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment