Skip to content
Snippets Groups Projects
Commit 5065af0c authored by Theo Lesage's avatar Theo Lesage Committed by Theo Lesage
Browse files

Add a worker run to processes in tests

parent 6ecb8598
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !2270. Comments created here will be created in the context of that merge request.
...@@ -117,6 +117,10 @@ class TestCreateProcess(FixtureAPITestCase): ...@@ -117,6 +117,10 @@ class TestCreateProcess(FixtureAPITestCase):
}) })
# The process needs to be started to produce a workflow # The process needs to be started to produce a workflow
process.worker_runs.create(
version=self.version_1
)
response = self.client.post( response = self.client.post(
reverse("api:process-start", kwargs={"pk": str(process.id)}), reverse("api:process-start", kwargs={"pk": str(process.id)}),
# The process needs a worker run or thumbnails generation to start # The process needs a worker run or thumbnails generation to start
...@@ -487,9 +491,12 @@ class TestCreateProcess(FixtureAPITestCase): ...@@ -487,9 +491,12 @@ class TestCreateProcess(FixtureAPITestCase):
self.assertEqual(process.elements.get(), page) self.assertEqual(process.elements.get(), page)
# The process needs to be started to produce a workflow # The process needs to be started to produce a workflow
process.worker_runs.create(
version=self.version_1
)
response = self.client.post( response = self.client.post(
reverse("api:process-start", kwargs={"pk": str(process.id)}), reverse("api:process-start", kwargs={"pk": str(process.id)}),
# The process needs a worker run or thumbnails generation to start
{} {}
) )
self.assertEqual(response.status_code, status.HTTP_201_CREATED) self.assertEqual(response.status_code, status.HTTP_201_CREATED)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment