Adds initial hacking checks to Patrole
This patch:
- Adds hacking check to Patrole (executed via tox -e pep8)
- Corrects a few hacking errors
- Adds hacking documentation to Patrole
Change-Id: Id43e24060a5290df91c594df6a38ba0cb239bbaf
diff --git a/patrole_tempest_plugin/rbac_rule_validation.py b/patrole_tempest_plugin/rbac_rule_validation.py
index 8de3d97..d77b2d6 100644
--- a/patrole_tempest_plugin/rbac_rule_validation.py
+++ b/patrole_tempest_plugin/rbac_rule_validation.py
@@ -31,7 +31,7 @@
def action(service, rule='', admin_only=False, expected_error_code=403,
- extra_target_data={}):
+ extra_target_data=None):
"""A decorator which does a policy check and matches it against test run.
A decorator which allows for positive and negative RBAC testing. Given
@@ -62,6 +62,10 @@
:raises Forbidden: for bullet (2) above.
:raises RbacOverPermission: for bullet (3) above.
"""
+
+ if extra_target_data is None:
+ extra_target_data = {}
+
def decorator(func):
role = CONF.rbac.rbac_test_role