mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-23 05:08:32 +00:00
Merge remote-tracking branch 'origin/feature/spec_files_wthout_db' into feature/spec_files_wthout_db
This commit is contained in:
commit
c830c468b6
@ -109,6 +109,8 @@ class WorkflowProcessor(object):
|
|||||||
if workflow_model.bpmn_workflow_json is None:
|
if workflow_model.bpmn_workflow_json is None:
|
||||||
self.workflow_spec_service.scan_file_system()
|
self.workflow_spec_service.scan_file_system()
|
||||||
spec_info = self.workflow_spec_service.get_spec(workflow_model.workflow_spec_id)
|
spec_info = self.workflow_spec_service.get_spec(workflow_model.workflow_spec_id)
|
||||||
|
if spec_info is None:
|
||||||
|
raise (ApiError("missing_spec", "The spec this workflow references does not currently exist."))
|
||||||
self.spec_files = SpecFileService.get_files(spec_info, include_libraries=True)
|
self.spec_files = SpecFileService.get_files(spec_info, include_libraries=True)
|
||||||
spec = self.get_spec(self.spec_files, spec_info)
|
spec = self.get_spec(self.spec_files, spec_info)
|
||||||
|
|
||||||
|
@ -307,6 +307,7 @@ class BaseTest(unittest.TestCase):
|
|||||||
|
|
||||||
def create_workflow(self, dir_name, display_name=None, study=None, category_id=None, as_user="dhf8r"):
|
def create_workflow(self, dir_name, display_name=None, study=None, category_id=None, as_user="dhf8r"):
|
||||||
session.flush()
|
session.flush()
|
||||||
|
self.workflow_spec_service.scan_file_system()
|
||||||
spec = self.workflow_spec_service.get_spec(dir_name)
|
spec = self.workflow_spec_service.get_spec(dir_name)
|
||||||
if spec is None:
|
if spec is None:
|
||||||
if display_name is None:
|
if display_name is None:
|
||||||
|
@ -7,8 +7,6 @@ import datetime
|
|||||||
class TestGetLocaltime(BaseTest):
|
class TestGetLocaltime(BaseTest):
|
||||||
|
|
||||||
def test_get_localtime(self):
|
def test_get_localtime(self):
|
||||||
self.load_example_data()
|
|
||||||
|
|
||||||
timestamp = datetime.datetime.utcnow()
|
timestamp = datetime.datetime.utcnow()
|
||||||
workflow = self.create_workflow('get_localtime')
|
workflow = self.create_workflow('get_localtime')
|
||||||
|
|
||||||
@ -28,7 +26,6 @@ class TestGetLocaltime(BaseTest):
|
|||||||
self.assertEqual(dateparser.parse(localtime_without), GetLocaltime().do_task(None, None, None, str(timestamp)))
|
self.assertEqual(dateparser.parse(localtime_without), GetLocaltime().do_task(None, None, None, str(timestamp)))
|
||||||
|
|
||||||
def test_get_localtime_with_timezone(self):
|
def test_get_localtime_with_timezone(self):
|
||||||
self.load_example_data()
|
|
||||||
|
|
||||||
timestamp = datetime.datetime.utcnow()
|
timestamp = datetime.datetime.utcnow()
|
||||||
workflow = self.create_workflow('get_localtime')
|
workflow = self.create_workflow('get_localtime')
|
||||||
@ -51,7 +48,6 @@ class TestGetLocaltime(BaseTest):
|
|||||||
|
|
||||||
def test_get_localtime_no_timestamp(self):
|
def test_get_localtime_no_timestamp(self):
|
||||||
workflow = self.create_workflow('get_localtime')
|
workflow = self.create_workflow('get_localtime')
|
||||||
|
|
||||||
workflow_api = self.get_workflow_api(workflow)
|
workflow_api = self.get_workflow_api(workflow)
|
||||||
task = workflow_api.next_task
|
task = workflow_api.next_task
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user