Example #1
0
 def _test_build_subattribute_match_rule(self, validate_value):
     bk = FAKE_RESOURCE["%ss" % FAKE_RESOURCE_NAME]["attr"]["validate"]
     FAKE_RESOURCE["%ss" % FAKE_RESOURCE_NAME]["attr"]["validate"] = validate_value
     action = "create_something"
     target = {"tenant_id": "fake", "attr": {"sub_attr_1": "x"}}
     self.assertFalse(
         policy._build_subattr_match_rule("attr", FAKE_RESOURCE["%ss" % FAKE_RESOURCE_NAME]["attr"], action, target)
     )
     FAKE_RESOURCE["%ss" % FAKE_RESOURCE_NAME]["attr"]["validate"] = bk
Example #2
0
 def _test_build_subattribute_match_rule(self, validate_value):
     bk = FAKE_RESOURCE['%ss' % FAKE_RESOURCE_NAME]['attr']['validate']
     FAKE_RESOURCE['%ss' % FAKE_RESOURCE_NAME]['attr']['validate'] = (
         validate_value)
     action = "create_something"
     target = {'tenant_id': 'fake', 'attr': {'sub_attr_1': 'x'}}
     self.assertFalse(
         policy._build_subattr_match_rule(
             'attr', FAKE_RESOURCE['%ss' % FAKE_RESOURCE_NAME]['attr'],
             action, target))
     FAKE_RESOURCE['%ss' % FAKE_RESOURCE_NAME]['attr']['validate'] = bk
Example #3
0
 def _test_build_subattribute_match_rule(self, validate_value):
     bk = FAKE_RESOURCE['%ss' % FAKE_RESOURCE_NAME]['attr']['validate']
     FAKE_RESOURCE['%ss' % FAKE_RESOURCE_NAME]['attr']['validate'] = (
         validate_value)
     action = "create_something"
     target = {'tenant_id': 'fake', 'attr': {'sub_attr_1': 'x'}}
     self.assertFalse(policy._build_subattr_match_rule(
         'attr',
         FAKE_RESOURCE['%ss' % FAKE_RESOURCE_NAME]['attr'],
         action,
         target))
     FAKE_RESOURCE['%ss' % FAKE_RESOURCE_NAME]['attr']['validate'] = bk