def test_log_rule_list(self): with contextlib.nested( mock.patch.object(policy.LOG, "isEnabledFor", return_value=True), mock.patch.object(policy.LOG, "debug") ) as (is_e, dbg): policy.log_rule_list(common_policy.RuleCheck("rule", "create_")) self.assertTrue(is_e.called) self.assertTrue(dbg.called)
def test_log_rule_list(self): with contextlib.nested( mock.patch.object(policy.LOG, 'isEnabledFor', return_value=True), mock.patch.object(policy.LOG, 'debug') ) as (is_e, dbg): policy.log_rule_list(common_policy.RuleCheck('rule', 'create_')) self.assertTrue(is_e.called) self.assertTrue(dbg.called)
def test_log_rule_list(self, mock_debug, mock_is_e): policy.log_rule_list(oslo_policy.RuleCheck('rule', 'create_')) self.assertTrue(mock_is_e.called) self.assertTrue(mock_debug.called)