Added tests for validation

This commit is contained in:
mike cullerton 2021-10-27 17:03:46 -04:00
parent c76d8230c0
commit 14593d54ef
1 changed files with 12 additions and 0 deletions

View File

@ -11,6 +11,12 @@ import types
class TestTaskLogging(BaseTest):
def test_logging_validation(self):
self.load_example_data()
spec_model = self.load_test_spec('logging_task')
rv = self.app.get('/v1.0/workflow-specification/%s/validate' % spec_model.id, headers=self.logged_in_headers())
self.assertEqual([], rv.json)
def test_add_log(self):
workflow = self.create_workflow('logging_task')
workflow_api = self.get_workflow_api(workflow)
@ -23,6 +29,12 @@ class TestTaskLogging(BaseTest):
self.assertEqual('info', log_model.level)
self.assertEqual('Activity_LogEvent', log_model.task)
def test_get_logging_validation(self):
self.load_example_data()
spec_model = self.load_test_spec('get_logging')
rv = self.app.get('/v1.0/workflow-specification/%s/validate' % spec_model.id, headers=self.logged_in_headers())
self.assertEqual([], rv.json)
def test_get_logs(self):
workflow = self.create_workflow('get_logging')
workflow_api = self.get_workflow_api(workflow)