Skip to content

Commit

Permalink
hotfix for workflows tests. (#396)
Browse files Browse the repository at this point in the history
This PR changes tests using workflows APIs.

During #390 some tests were not proper changed for the new pattern of
the API and this introduced faulty tests on master branch.
  • Loading branch information
costaconrado authored Dec 5, 2023
2 parents dc93dc7 + 5be2e71 commit 3ccf1c5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/workflows/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def test_adjust(self, auth_client, test_api_uri):
flaw.save(raise_validation_error=False)

response = auth_client.post(
f"{test_api_uri}/workflows/{flaw.uuid}/adjust",
f"{test_api_uri}/{flaw.uuid}/adjust",
data={},
format="json",
)
Expand Down Expand Up @@ -286,7 +286,7 @@ def test_classification(self, auth_client, test_api_uri):
AffectFactory(flaw=flaw)

response = auth_client.get(
f"{test_api_uri}/workflows/{flaw.uuid}",
f"{test_api_uri}/{flaw.uuid}",
data={},
format="json",
)
Expand All @@ -301,11 +301,10 @@ def test_classification(self, auth_client, test_api_uri):

def test_workflows(self, auth_client, test_api_uri):
response = auth_client.get(
f"{test_api_uri}/workflows",
f"{test_api_uri}",
data={},
format="json",
)
json_body = response.json()
workflows = WorkflowSerializer(WorkflowFramework().workflows, many=True).data

assert json_body["workflows"] == workflows

0 comments on commit 3ccf1c5

Please sign in to comment.