Refactoring RbacUtils
Remove RbacUtils class and move all functionality to RbacUtilsMixin.
Story: 2002604
Task: 22223
Change-Id: If476be8fd3df78b28669ca940ebeb288af534899
diff --git a/patrole_tempest_plugin/tests/unit/base.py b/patrole_tempest_plugin/tests/unit/base.py
index 9a801bd..c08da43 100644
--- a/patrole_tempest_plugin/tests/unit/base.py
+++ b/patrole_tempest_plugin/tests/unit/base.py
@@ -16,17 +16,15 @@
from tempest.tests import base
+from patrole_tempest_plugin.tests.unit import fixtures as patrole_fixtures
+
class TestCase(base.TestCase):
-
"""Test case base class for all unit tests."""
- def get_all_needed_roles(self, roles):
- role_inferences_mapping = {
- "admin": {"member", "reader"},
- "member": {"reader"}
- }
- res = set(r.lower() for r in roles)
- for role in res.copy():
- res.update(role_inferences_mapping.get(role, set()))
- return list(res)
+ def setUp(self):
+ super(TestCase, self).setUp()
+ # Disable patrole log for unit tests.
+ self.useFixture(
+ patrole_fixtures.ConfPatcher(enable_reporting=False,
+ group='patrole_log'))