def test_that_when_putting_targets_fails_the_put_targets_method_returns_error(self):
     '''
     tests False when thing type not created
     '''
     self.conn.put_targets.side_effect = ClientError(error_content, 'put_targets')
     result = boto_cloudwatch_event.put_targets(Rule=rule_name,
                                         Targets=[],
                                         **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('put_targets'))
 def test_that_when_putting_targets_succeeds_the_put_target_method_returns_no_failures(self):
     '''
     tests None when targets added
     '''
     self.conn.put_targets.return_value = {'FailedEntryCount': 0}
     result = boto_cloudwatch_event.put_targets(Rule=rule_name,
                                         Targets=[],
                                         **conn_parameters)
     self.assertIsNone(result['failures'])
 def test_that_when_putting_targets_fails_the_put_targets_method_returns_error(self):
     '''
     tests False when thing type not created
     '''
     self.conn.put_targets.side_effect = ClientError(error_content, 'put_targets')
     result = boto_cloudwatch_event.put_targets(Rule=rule_name,
                                         Targets=[],
                                         **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('put_targets'))
 def test_that_when_putting_targets_succeeds_the_put_target_method_returns_no_failures(self):
     '''
     tests None when targets added
     '''
     self.conn.put_targets.return_value = {'FailedEntryCount': 0}
     result = boto_cloudwatch_event.put_targets(Rule=rule_name,
                                         Targets=[],
                                         **conn_parameters)
     self.assertIsNone(result['failures'])
Example #5
0
 def test_that_when_putting_targets_succeeds_the_put_target_method_returns_no_failures(
     self, ):
     """
     tests None when targets added
     """
     self.conn.put_targets.return_value = {"FailedEntryCount": 0}
     result = boto_cloudwatch_event.put_targets(Rule=rule_name,
                                                Targets=[],
                                                **conn_parameters)
     assert result["failures"] is None
Example #6
0
 def test_that_when_putting_targets_fails_the_put_targets_method_returns_error(
         self):
     """
     tests False when thing type not created
     """
     self.conn.put_targets.side_effect = ClientError(
         error_content, "put_targets")
     result = boto_cloudwatch_event.put_targets(Rule=rule_name,
                                                Targets=[],
                                                **conn_parameters)
     assert result.get(
         "error", {}).get("message") == error_message.format("put_targets")