Example #1
0
 def test_policy_file_load(self):
     policy.reset()
     enforcer = policy._get_enforcer()
     self.assertEqual(len(enforcer), 2)
     self.assertTrue('identity' in enforcer)
     self.assertTrue('compute' in enforcer)
Example #2
0
 def test_policy_reset(self):
     policy._get_enforcer()
     self.assertEqual(len(policy._ENFORCER), 2)
     policy.reset()
     self.assertEqual(policy._ENFORCER, None)
Example #3
0
 def test_policy_reset(self):
     policy._get_enforcer()
     self.assertEqual(len(policy._ENFORCER), 2)
     policy.reset()
     self.assertEqual(policy._ENFORCER, None)
Example #4
0
 def test_policy_file_load(self):
     policy.reset()
     enforcer = policy._get_enforcer()
     self.assertEqual(len(enforcer), 2)
     self.assertTrue('identity' in enforcer)
     self.assertTrue('compute' in enforcer)
Example #5
0
 def test_policy_reset(self):
     policy._get_enforcer()
     self.assertEqual(2, len(policy._ENFORCER))
     policy.reset()
     self.assertIsNone(policy._ENFORCER)
Example #6
0
 def test_policy_file_load(self):
     policy.reset()
     enforcer = policy._get_enforcer()
     self.assertEqual(2, len(enforcer))
     self.assertTrue("identity" in enforcer)
     self.assertTrue("compute" in enforcer)
Example #7
0
 def test_policy_reset(self):
     policy._get_enforcer()
     self.assertEqual(2, len(policy._ENFORCER))
     policy.reset()
     self.assertIsNone(policy._ENFORCER)