def test_policy_reset(self): policy_backend._get_enforcer() self.assertEqual(2, len(policy_backend._ENFORCER)) policy_backend.reset() self.assertIsNone(policy_backend._ENFORCER)
def test_policy_file_load(self): policy_backend.reset() enforcer = policy_backend._get_enforcer() self.assertEqual(2, len(enforcer)) self.assertTrue('identity' in enforcer) self.assertTrue('compute' in enforcer)