aboutsummaryrefslogtreecommitdiffstats
path: root/python_moondb/tests/unit_python/policies/test_policies.py
diff options
context:
space:
mode:
Diffstat (limited to 'python_moondb/tests/unit_python/policies/test_policies.py')
-rwxr-xr-xpython_moondb/tests/unit_python/policies/test_policies.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/python_moondb/tests/unit_python/policies/test_policies.py b/python_moondb/tests/unit_python/policies/test_policies.py
index 003361d0..f1dd258f 100755
--- a/python_moondb/tests/unit_python/policies/test_policies.py
+++ b/python_moondb/tests/unit_python/policies/test_policies.py
@@ -103,6 +103,19 @@ def test_add_policies_twice_with_same_id(db):
# assert str(exception_info.value) == '409: Policy Error'
+def test_add_policies_twice_with_same_name(db):
+ value = {
+ "name": "test_policy",
+ "model_id": "",
+ "genre": "authz",
+ "description": "test",
+ }
+ add_policies(value=value)
+ with pytest.raises(Exception) as exception_info:
+ add_policies(value=value)
+ # assert str(exception_info.value) == '409: Policy Error'
+
+
def test_delete_policies(db):
value = {
"name": "test_policy1",