lookup service tests passing, but I need to revist this.
This commit is contained in:
parent
de6d7eee84
commit
e9fd76ed99
|
@ -77,7 +77,8 @@ class LookupService(object):
|
|||
if lookup_model.is_ldap: # LDAP is always current
|
||||
is_current = True
|
||||
else:
|
||||
current_date = SpecFileService.last_modified(workflow.workflow_spec, lookup_model.file_name)
|
||||
workflow_spec = WorkflowSpecService().get_spec(workflow.workflow_spec_id)
|
||||
current_date = SpecFileService.last_modified(workflow_spec, lookup_model.file_name)
|
||||
is_current = current_date == lookup_model.last_updated
|
||||
|
||||
if not is_current:
|
||||
|
|
|
@ -49,8 +49,7 @@ class TestLookupService(BaseTest):
|
|||
file_path = os.path.join(app.root_path, '..', 'tests', 'data',
|
||||
'enum_options_with_search', 'sponsors_modified.xlsx')
|
||||
file = open(file_path, 'rb')
|
||||
workflow_spec_model = session.query(WorkflowSpecModel)\
|
||||
.filter(WorkflowSpecModel.id == workflow.workflow_spec_id).first()
|
||||
workflow_spec_model = self.workflow_spec_service.get_spec(workflow.workflow_spec_id)
|
||||
SpecFileService().update_file(workflow_spec_model, "sponsors.xlsx", file.read())
|
||||
file.close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue