commit | 2fe986dbb6c7812438b82968ff078dcc66750e74 | [log] [tgz] |
---|---|---|
author | Felipe Monteiro <felipe.monteiro@att.com> | Tue Mar 20 21:53:51 2018 +0000 |
committer | Felipe Monteiro <felipe.monteiro@att.com> | Tue Mar 27 22:10:38 2018 +0000 |
tree | a5c037bd8a5fce1f005e2e5d9c772978acfcaba0 | |
parent | a1db761f098c8e17c698f3fa37d7692e7b3d0069 [diff] |
Add functools.wraps decorator to rbac_rule_validation This adds functools.wraps [0] to rbac_rule_validation decorator. "This takes a function used in a decorator and adds the functionality of copying over the function name, docstring, arguments list, etc." which is quite convenient [1]. Also stops adding the role as a testcase attribute which can cause filtering issues via regular expressions when the role doesn't match the role in tempest.conf under ``[patrole].rbac_test_role``. [0] https://docs.python.org/2/library/functools.html#functools.wraps [1] https://stackoverflow.com/questions/308999/what-does-functools-wraps-do Change-Id: I8fde00e4f9332ba9b9ea94edc714d87ab9e1b851