Advertisement
Guest User

Untitled

a guest
Nov 8th, 2021
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.91 KB | None | 0 0
  1. diff --git a/nova/tests/unit/policies/base.py b/nova/tests/unit/policies/base.py
  2. index 8376cc9cdf..261a0f1631 100644
  3. --- a/nova/tests/unit/policies/base.py
  4. +++ b/nova/tests/unit/policies/base.py
  5. @@ -124,6 +124,13 @@ class BasePolicyTest(test.TestCase):
  6.              self.policy.set_rules(self.rules_without_deprecation,
  7.                                    overwrite=False)
  8.  
  9. +    def common_policy_auth(self, authorized_contexts,
  10. +                           rule_name,
  11. +                           func, req, *arg, **kwarg):
  12. +        unauth = set(self.all_contexts) - set(authorized_contexts)
  13. +        return self.common_policy_check(authorized_contexts, unauth,
  14. +                                        rule_name, func, req, *arg, **kwarg)
  15. +
  16.      def common_policy_check(self, authorized_contexts,
  17.                              unauthorized_contexts, rule_name,
  18.                              func, req, *arg, **kwarg):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement