Skip to content

Commit

Permalink
Test threats and security functions with is_published=True
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Feb 29, 2024
1 parent 9982318 commit 6cd989d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/app_tests/api/test_api_security_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_get_security_functions(self):
"name": SECURITY_FUNCTION_NAME,
"description": SECURITY_FUNCTION_DESCRIPTION,
"folder": Folder.objects.create(name="test"),
"is_published": True,
},
)

Expand Down Expand Up @@ -62,6 +63,7 @@ def test_update_security_functions(self):
"name": SECURITY_FUNCTION_NAME,
"description": SECURITY_FUNCTION_DESCRIPTION,
"folder": Folder.objects.create(name="test"),
"is_published": True,
},
{
"ref_id": "new " + SECURITY_FUNCTION_REF_ID,
Expand All @@ -81,6 +83,7 @@ def test_delete_security_functions(self):
"ref_id": SECURITY_FUNCTION_REF_ID,
"name": SECURITY_FUNCTION_NAME,
"folder": Folder.objects.create(name="test"),
"is_published": True,
},
)

Expand Down Expand Up @@ -108,6 +111,7 @@ def test_get_security_functions(self, test):
"description": SECURITY_FUNCTION_DESCRIPTION,
"urn": SECURITY_FUNCTION_URN,
"provider": SECURITY_FUNCTION_PROVIDER,
"is_published": True,
},
{
"folder": {"str": Folder.get_root_folder().name},
Expand Down Expand Up @@ -148,6 +152,7 @@ def test_update_security_function_with_urn(self, test):
"description": SECURITY_FUNCTION_DESCRIPTION,
"urn": SECURITY_FUNCTION_URN,
"provider": SECURITY_FUNCTION_PROVIDER,
"is_published": True,
},
{
"ref_id": SECURITY_FUNCTION_REF_ID,
Expand Down
4 changes: 4 additions & 0 deletions backend/app_tests/api/test_api_threats.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_get_threats(self):
"ref_id": THREAT_REF_ID,
"name": THREAT_NAME,
"description": THREAT_DESCRIPTION,
"is_published": True,
"folder": Folder.objects.create(name="test"),
},
)
Expand Down Expand Up @@ -64,6 +65,7 @@ def test_update_threats(self):
"description": THREAT_DESCRIPTION,
"provider": THREAT_PROVIDER,
"folder": Folder.objects.create(name="test"),
"is_published": True,
},
{
"ref_id": "new " + THREAT_REF_ID,
Expand Down Expand Up @@ -111,6 +113,7 @@ def test_get_threats(self, test):
"description": THREAT_DESCRIPTION,
"provider": THREAT_PROVIDER,
"urn": THREAT_URN,
"is_published": True,
},
{
"folder": {"str": Folder.get_root_folder().name},
Expand Down Expand Up @@ -153,6 +156,7 @@ def test_update_threats_with_urn(self, test):
"description": THREAT_DESCRIPTION,
"provider": THREAT_PROVIDER,
"urn": THREAT_URN,
"is_published": True,
},
{
"ref_id": "new " + THREAT_REF_ID,
Expand Down

0 comments on commit 6cd989d

Please sign in to comment.