예제 #1
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)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('put_targets'))
예제 #2
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)
     self.assertIsNone(result['failures'])
예제 #3
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)
     self.assertEqual(result.get('error', {}).get('message'), error_message.format('put_targets'))
예제 #4
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)
     self.assertIsNone(result['failures'])
예제 #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
예제 #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")