don't try to load the workflowspecservice too early.

This commit is contained in:
Dan 2022-02-07 12:38:00 -05:00
parent abc17a8aff
commit ad095aaaf5
2 changed files with 1 additions and 2 deletions

View File

@ -55,9 +55,7 @@ from crc import models
from crc import api
from crc.api import admin
from crc.services.workflow_service import WorkflowService
from crc.services.workflow_spec_service import WorkflowSpecService
connexion_app.add_api('api.yml', base_path='/v1.0')
workflow_spec_service = WorkflowSpecService()
# needed function to avoid circular import
def process_waiting_tasks():

View File

@ -37,6 +37,7 @@ class TestWorkflowSync(BaseTest):
self.assertEquals(0, len(workflow_spec_service.get_categories()))
self.assertEquals(0, len(workflow_spec_service.get_specs()))
self.copy_files_to_file_system()
workflow_spec_service.scan_file_system()
self.assertEquals(2, len(workflow_spec_service.get_categories()))
self.assertEquals(5, len(workflow_spec_service.get_specs()))
self.assertEquals(1, len(workflow_spec_service.get_category('Category Number One').workflows))