From 36287b8791bd2e4d49776b6c8de7fc2ed3d17693 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Wed, 3 Apr 2024 15:55:43 +0200 Subject: [PATCH] fix: api tests --- backend/app_tests/api/test_api_compliance_assessments.py | 6 +++--- backend/app_tests/api/test_api_risk_assessments.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/app_tests/api/test_api_compliance_assessments.py b/backend/app_tests/api/test_api_compliance_assessments.py index 629138450..0ff2003d7 100644 --- a/backend/app_tests/api/test_api_compliance_assessments.py +++ b/backend/app_tests/api/test_api_compliance_assessments.py @@ -118,7 +118,7 @@ def test_get_compliance_assessments(self, test): "framework": Framework.objects.all()[0], }, { - "project": {"id": str(project.id), "str": project.name}, + "project": {"id": str(project.id), "str": project.folder.name + "/" + project.name}, "framework": { "id": str(Framework.objects.all()[0].id), "str": str(Framework.objects.all()[0]), @@ -146,7 +146,7 @@ def test_create_compliance_assessments(self, test): "framework": str(Framework.objects.all()[0].id), }, { - "project": {"id": str(project.id), "str": project.name}, + "project": {"id": str(project.id), "str": project.folder.name + "/" + project.name}, "framework": { "id": str(Framework.objects.all()[0].id), "str": str(Framework.objects.all()[0]), @@ -186,7 +186,7 @@ def test_update_compliance_assessments(self, test): "framework": str(Framework.objects.all()[1].id), }, { - "project": {"id": str(project.id), "str": project.name}, + "project": {"id": str(project.id), "str": project.folder.name + "/" + project.name}, "framework": { "id": str(Framework.objects.all()[0].id), "str": str(Framework.objects.all()[0]), diff --git a/backend/app_tests/api/test_api_risk_assessments.py b/backend/app_tests/api/test_api_risk_assessments.py index 33ffb4694..22ad2431a 100644 --- a/backend/app_tests/api/test_api_risk_assessments.py +++ b/backend/app_tests/api/test_api_risk_assessments.py @@ -121,7 +121,7 @@ def test_get_risk_assessments(self, test): "risk_matrix": risk_matrix, }, { - "project": {"id": str(project.id), "str": project.name}, + "project": {"id": str(project.id), "str": project.folder.name + "/" + project.name}, "risk_matrix": {"id": str(risk_matrix.id), "str": str(risk_matrix)}, }, user_group=test.user_group, @@ -147,7 +147,7 @@ def test_create_risk_assessments(self, test): "risk_matrix": str(risk_matrix.id), }, { - "project": {"id": str(project.id), "str": project.name}, + "project": {"id": str(project.id), "str": project.folder.name + "/" + project.name}, "risk_matrix": {"id": str(risk_matrix.id), "str": str(risk_matrix)}, }, user_group=test.user_group, @@ -185,7 +185,7 @@ def test_update_risk_assessments(self, test): "risk_matrix": str(risk_matrix2.id), }, { - "project": {"id": str(project.id), "str": project.name}, + "project": {"id": str(project.id), "str": project.folder.name + "/" + project.name}, "risk_matrix": {"id": str(risk_matrix.id), "str": str(risk_matrix)}, }, user_group=test.user_group,