def test_that_when_deleting_a_rule_fails_the_delete_method_returns_error(self):
     '''
     tests False when delete rule fails
     '''
     self.conn.delete_rule.side_effect = ClientError(error_content, 'delete_rule')
     result = boto_cloudwatch_event.delete(Name=rule_name, **conn_parameters)
     self.assertFalse(result.get('deleted'))
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('delete_rule'))
 def test_that_when_deleting_a_rule_fails_the_delete_method_returns_error(self):
     '''
     tests False when delete rule fails
     '''
     self.conn.delete_rule.side_effect = ClientError(error_content, 'delete_rule')
     result = boto_cloudwatch_event.delete(Name=rule_name, **conn_parameters)
     self.assertFalse(result.get('deleted'))
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('delete_rule'))
    def test_that_when_deleting_a_rule_succeeds_the_delete_method_returns_true(self):
        '''
        tests True when delete rule succeeds
        '''
        self.conn.delete_rule.return_value = {}
        result = boto_cloudwatch_event.delete(Name=rule_name, **conn_parameters)

        self.assertTrue(result.get('deleted'))
        self.assertEqual(result.get('error'), None)
    def test_that_when_deleting_a_rule_succeeds_the_delete_method_returns_true(self):
        """
        tests True when delete rule succeeds
        """
        self.conn.delete_rule.return_value = {}
        result = boto_cloudwatch_event.delete(Name=rule_name, **conn_parameters)

        self.assertTrue(result.get("deleted"))
        self.assertEqual(result.get("error"), None)
 def test_that_when_deleting_a_rule_fails_the_delete_method_returns_error(self):
     """
     tests False when delete rule fails
     """
     self.conn.delete_rule.side_effect = ClientError(error_content, "delete_rule")
     result = boto_cloudwatch_event.delete(Name=rule_name, **conn_parameters)
     self.assertFalse(result.get("deleted"))
     self.assertEqual(
         result.get("error", {}).get("message"), error_message.format("delete_rule")
     )