summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2015-11-25 10:48:04 +0100
committerasteroide <thomas.duval@orange.com>2015-11-25 10:48:04 +0100
commit56c1deb569cd268c35562ada9a86b6fecf47ceb1 (patch)
tree6622d884ed6d0cab1ede386c64278cbb72c0c323
parent5cc4124b9e0640318a9ed54896f2ddd2051bebe0 (diff)
Re-run unittests and fix some bugs.
Change-Id: Ibf63942a55bd4c3792bbfb4cd25d665923a3b1af
-rw-r--r--keystone-moon/keystone/contrib/moon/backends/flat.py4
-rw-r--r--keystone-moon/keystone/tests/moon/unit/test_unit_core_configuration.py2
-rw-r--r--keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_admin.py56
-rw-r--r--keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_authz.py66
-rw-r--r--keystone-moon/keystone/tests/moon/unit/test_unit_core_tenant.py10
5 files changed, 66 insertions, 72 deletions
diff --git a/keystone-moon/keystone/contrib/moon/backends/flat.py b/keystone-moon/keystone/contrib/moon/backends/flat.py
index 47c5529a..05c1850b 100644
--- a/keystone-moon/keystone/contrib/moon/backends/flat.py
+++ b/keystone-moon/keystone/contrib/moon/backends/flat.py
@@ -70,7 +70,7 @@ class LogConnector(LogDriver):
if filter_str:
_logs = filter(lambda x: filter_str in x, _logs)
if time_from:
- if type(time_from) is basestring:
+ if isinstance(time_from, basestring):
time_from = time.strptime(time_from.split(" ")[0], self.TIME_FORMAT)
try:
__logs = []
@@ -83,7 +83,7 @@ class LogConnector(LogDriver):
self.error("Time format error")
if time_to:
try:
- if type(time_to) is basestring:
+ if isinstance(time_to, basestring):
time_to = time.strptime(time_to.split(" ")[0], self.TIME_FORMAT)
__logs = []
for log in _logs:
diff --git a/keystone-moon/keystone/tests/moon/unit/test_unit_core_configuration.py b/keystone-moon/keystone/tests/moon/unit/test_unit_core_configuration.py
index efc5acd2..8aa8bcd9 100644
--- a/keystone-moon/keystone/tests/moon/unit/test_unit_core_configuration.py
+++ b/keystone-moon/keystone/tests/moon/unit/test_unit_core_configuration.py
@@ -73,7 +73,7 @@ class TestConfigurationManager(tests.TestCase):
self.assertIn("policy_root", data)
# def test_get_aggregation_algorithm_dict(self):
- # admin_intra_extension = create_intra_extension(self, policy_model="policy_admin")
+ # admin_intra_extension = create_intra_extension(self, policy_model="policy_rbac_admin")
# print(admin_intra_extension)
# data = self.manager.get_aggregation_algorithm_dict(self.ADMIN_ID, admin_intra_extension['id'])
# print(data)
diff --git a/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_admin.py b/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_admin.py
index f92d1e3b..00e9e09f 100644
--- a/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_admin.py
+++ b/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_admin.py
@@ -81,7 +81,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_subjects(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -122,7 +122,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_objects(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -140,7 +140,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_actions(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -158,7 +158,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_subject_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -196,7 +196,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_object_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -235,7 +235,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_action_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -274,7 +274,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_subject_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -337,7 +337,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_object_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -400,7 +400,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_action_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -463,7 +463,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_subject_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -586,7 +586,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_object_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -712,7 +712,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_action_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -841,7 +841,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_sub_meta_rules(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -880,7 +880,7 @@ class TestIntraExtensionAdminManagerOK(tests.TestCase):
def test_sub_rules(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1000,7 +1000,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_subjects(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1052,7 +1052,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_objects(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1106,7 +1106,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_actions(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1160,7 +1160,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_subject_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1209,7 +1209,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_object_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1258,7 +1258,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_action_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1307,7 +1307,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_subject_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1379,7 +1379,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_object_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1451,7 +1451,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_action_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1523,7 +1523,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_subject_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1675,7 +1675,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_object_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1830,7 +1830,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_action_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1988,7 +1988,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_sub_meta_rules(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -2027,7 +2027,7 @@ class TestIntraExtensionAdminManagerKO(tests.TestCase):
def test_sub_rules(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
diff --git a/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_authz.py b/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_authz.py
index ff7010fe..51654227 100644
--- a/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_authz.py
+++ b/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_authz.py
@@ -79,7 +79,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_subjects(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -120,7 +120,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_objects(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -138,7 +138,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_actions(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -156,7 +156,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_subject_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -194,7 +194,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_object_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -233,7 +233,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_action_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -272,7 +272,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_subject_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -333,7 +333,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_object_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -394,7 +394,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_action_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -455,7 +455,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_subject_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -576,7 +576,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_object_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -700,7 +700,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_action_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -827,7 +827,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_sub_meta_rules(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -864,7 +864,7 @@ class TestIntraExtensionAuthzManagerAuthzOK(tests.TestCase):
def test_sub_rules(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -990,7 +990,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_delete_admin_intra_extension(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1002,14 +1002,8 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
admin_ie_dict["id"])
def test_authz_exceptions(self):
- self.assertRaises(
- TenantUnknown,
- self.authz_manager.authz,
- uuid.uuid4().hex, uuid.uuid4().hex, uuid.uuid4().hex, uuid.uuid4().hex
- )
-
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1249,7 +1243,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_subjects(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1299,7 +1293,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_objects(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1351,7 +1345,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_actions(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1403,7 +1397,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_subject_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1450,7 +1444,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_object_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1497,7 +1491,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_action_categories(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1544,7 +1538,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_subject_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1614,7 +1608,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_object_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1684,7 +1678,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_action_category_scope(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1754,7 +1748,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_subject_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -1904,7 +1898,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_object_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -2057,7 +2051,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_action_category_assignment(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -2213,7 +2207,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_sub_meta_rules(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
@@ -2250,7 +2244,7 @@ class TestIntraExtensionAuthzManagerAuthzKO(tests.TestCase):
def test_sub_rules(self):
authz_ie_dict = create_intra_extension(self, "policy_authz")
- admin_ie_dict = create_intra_extension(self, "policy_admin")
+ admin_ie_dict = create_intra_extension(self, "policy_rbac_admin")
tenant, mapping = create_mapping(self, "demo", authz_ie_dict['id'], admin_ie_dict['id'])
admin_subject_id, admin_subject_dict = \
diff --git a/keystone-moon/keystone/tests/moon/unit/test_unit_core_tenant.py b/keystone-moon/keystone/tests/moon/unit/test_unit_core_tenant.py
index 794ececc..99fb5965 100644
--- a/keystone-moon/keystone/tests/moon/unit/test_unit_core_tenant.py
+++ b/keystone-moon/keystone/tests/moon/unit/test_unit_core_tenant.py
@@ -74,7 +74,7 @@ class TestTenantManager(tests.TestCase):
def test_add_tenant(self):
authz_intra_extension = create_intra_extension(self, policy_model="policy_authz")
- admin_intra_extension = create_intra_extension(self, policy_model="policy_admin")
+ admin_intra_extension = create_intra_extension(self, policy_model="policy_rbac_admin")
new_tenant = {
"id": uuid.uuid4().hex,
"name": "demo",
@@ -99,7 +99,7 @@ class TestTenantManager(tests.TestCase):
def test_del_tenant(self):
authz_intra_extension = create_intra_extension(self, policy_model="policy_authz")
- admin_intra_extension = create_intra_extension(self, policy_model="policy_admin")
+ admin_intra_extension = create_intra_extension(self, policy_model="policy_rbac_admin")
new_tenant = {
"id": uuid.uuid4().hex,
"name": "demo",
@@ -120,7 +120,7 @@ class TestTenantManager(tests.TestCase):
def test_set_tenant(self):
authz_intra_extension = create_intra_extension(self, policy_model="policy_authz")
- admin_intra_extension = create_intra_extension(self, policy_model="policy_admin")
+ admin_intra_extension = create_intra_extension(self, policy_model="policy_rbac_admin")
new_tenant = {
"id": uuid.uuid4().hex,
"name": "demo",
@@ -150,7 +150,7 @@ class TestTenantManager(tests.TestCase):
self.assertRaises(TenantUnknown, self.tenant_manager.set_tenant_dict, self.ADMIN_ID, uuid.uuid4().hex, {})
authz_intra_extension = create_intra_extension(self, policy_model="policy_authz")
- admin_intra_extension = create_intra_extension(self, policy_model="policy_admin")
+ admin_intra_extension = create_intra_extension(self, policy_model="policy_rbac_admin")
new_tenant = {
"id": uuid.uuid4().hex,
"name": "demo",
@@ -170,7 +170,7 @@ class TestTenantManager(tests.TestCase):
def test_exception_tenant_added_name_existing(self):
authz_intra_extension = create_intra_extension(self, policy_model="policy_authz")
- admin_intra_extension = create_intra_extension(self, policy_model="policy_admin")
+ admin_intra_extension = create_intra_extension(self, policy_model="policy_rbac_admin")
new_tenant = {
"id": uuid.uuid4().hex,
"name": "demo",