Add per document type, workflow list API view. GitLab issue #357, GitLab merge request #!9. cc @jeverling

This commit is contained in:
Roberto Rosario
2017-02-15 20:20:14 -04:00
parent 722007702c
commit 8b20015f64
3 changed files with 50 additions and 5 deletions

View File

@@ -186,6 +186,19 @@ class WorkflowAPITestCase(APITestCase):
workflow.refresh_from_db()
self.assertEqual(workflow.label, TEST_WORKFLOW_LABEL_EDITED)
def test_document_type_workflow_list(self):
workflow = self._create_workflow()
workflow.document_types.add(self.document_type)
response = self.client.get(
reverse(
'rest_api:documenttype-workflow-list',
args=(self.document_type.pk,)
),
)
self.assertEqual(response.data['results'][0]['label'], workflow.label)
@override_settings(OCR_AUTO_OCR=False)
class WorkflowStatesAPITestCase(APITestCase):