def test_that_when_deleting_an_event_source_mapping_without_identifier_the_delete_event_source_mapping_method_raises_saltinvocationexception(self):
     '''
     tests Deleting a mapping without identifier
     '''
     with self.assertRaisesRegexp(SaltInvocationError,
                                  'Either UUID must be specified, or EventSourceArn and FunctionName must be provided.'):
         result = boto_lambda.delete_event_source_mapping(**conn_parameters)
 def test_that_when_deleting_an_event_source_mapping_without_identifier_the_delete_event_source_mapping_method_raises_saltinvocationexception(self):
     '''
     tests Deleting a mapping without identifier
     '''
     with self.assertRaisesRegexp(SaltInvocationError,
                                  'Either UUID must be specified, or EventSourceArn and FunctionName must be provided.'):
         result = boto_lambda.delete_event_source_mapping(**conn_parameters)
Exemple #3
0
 def test_that_when_deleting_an_event_source_mapping_by_UUID_succeeds_the_delete_event_source_mapping_method_returns_true(self):
     '''
     tests True mapping deleted.
     '''
     result = boto_lambda.delete_event_source_mapping(
         UUID=event_source_mapping_ret['UUID'],
         **conn_parameters)
     self.assertTrue(result['deleted'])
 def test_that_when_deleting_an_event_source_mapping_by_UUID_succeeds_the_delete_event_source_mapping_method_returns_true(
     self, ):
     """
     tests True mapping deleted.
     """
     result = boto_lambda.delete_event_source_mapping(
         UUID=event_source_mapping_ret["UUID"], **conn_parameters)
     self.assertTrue(result["deleted"])
 def test_that_when_deleting_an_event_source_mapping_fails_the_delete_event_source_mapping_method_returns_false(self):
     '''
     tests False mapping not deleted.
     '''
     self.conn.delete_event_source_mapping.side_effect = ClientError(error_content, 'delete_event_source_mapping')
     result = boto_lambda.delete_event_source_mapping(UUID=event_source_mapping_ret['UUID'],
                                       **conn_parameters)
     self.assertFalse(result['deleted'])
Exemple #6
0
 def test_that_when_deleting_an_event_source_mapping_by_UUID_succeeds_the_delete_event_source_mapping_method_returns_true(
     self
 ):
     """
     tests True mapping deleted.
     """
     result = boto_lambda.delete_event_source_mapping(UUID=event_source_mapping_ret["UUID"], **conn_parameters)
     self.assertTrue(result["deleted"])
 def test_that_when_deleting_an_event_source_mapping_fails_the_delete_event_source_mapping_method_returns_false(self):
     '''
     tests False mapping not deleted.
     '''
     self.conn.delete_event_source_mapping.side_effect = ClientError(error_content, 'delete_event_source_mapping')
     result = boto_lambda.delete_event_source_mapping(UUID=event_source_mapping_ret['UUID'],
                                       **conn_parameters)
     self.assertFalse(result['deleted'])
Exemple #8
0
 def test_that_when_deleting_an_event_source_mapping_fails_the_delete_event_source_mapping_method_returns_false(
     self
 ):
     """
     tests False mapping not deleted.
     """
     self.conn.delete_event_source_mapping.side_effect = ClientError(error_content, "delete_event_source_mapping")
     result = boto_lambda.delete_event_source_mapping(UUID=event_source_mapping_ret["UUID"], **conn_parameters)
     self.assertFalse(result["deleted"])
 def test_that_when_deleting_an_event_source_mapping_fails_the_delete_event_source_mapping_method_returns_false(
     self, ):
     """
     tests False mapping not deleted.
     """
     self.conn.delete_event_source_mapping.side_effect = ClientError(
         error_content, "delete_event_source_mapping")
     result = boto_lambda.delete_event_source_mapping(
         UUID=event_source_mapping_ret["UUID"], **conn_parameters)
     self.assertFalse(result["deleted"])
 def test_that_when_deleting_an_event_source_mapping_by_name_succeeds_the_delete_event_source_mapping_method_returns_true(self):
     '''
     tests True mapping deleted.
     '''
     self.conn.list_event_source_mappings.return_value = {'EventSourceMappings': [event_source_mapping_ret]}
     result = boto_lambda.delete_event_source_mapping(
                          EventSourceArn=event_source_mapping_ret['EventSourceArn'],
                          FunctionName=event_source_mapping_ret['FunctionArn'],
                          **conn_parameters)
     self.assertTrue(result['deleted'])
 def test_that_when_deleting_an_event_source_mapping_by_name_succeeds_the_delete_event_source_mapping_method_returns_true(self):
     '''
     tests True mapping deleted.
     '''
     self.conn.list_event_source_mappings.return_value = {'EventSourceMappings': [event_source_mapping_ret]}
     result = boto_lambda.delete_event_source_mapping(
                          EventSourceArn=event_source_mapping_ret['EventSourceArn'],
                          FunctionName=event_source_mapping_ret['FunctionArn'],
                          **conn_parameters)
     self.assertTrue(result['deleted'])
 def test_that_when_deleting_an_event_source_mapping_by_name_succeeds_the_delete_event_source_mapping_method_returns_true(
     self, ):
     """
     tests True mapping deleted.
     """
     self.conn.list_event_source_mappings.return_value = {
         "EventSourceMappings": [event_source_mapping_ret]
     }
     result = boto_lambda.delete_event_source_mapping(
         EventSourceArn=event_source_mapping_ret["EventSourceArn"],
         FunctionName=event_source_mapping_ret["FunctionArn"],
         **conn_parameters)
     self.assertTrue(result["deleted"])
Exemple #13
0
 def test_that_when_deleting_an_event_source_mapping_by_name_succeeds_the_delete_event_source_mapping_method_returns_true(
     self
 ):
     """
     tests True mapping deleted.
     """
     self.conn.list_event_source_mappings.return_value = {"EventSourceMappings": [event_source_mapping_ret]}
     result = boto_lambda.delete_event_source_mapping(
         EventSourceArn=event_source_mapping_ret["EventSourceArn"],
         FunctionName=event_source_mapping_ret["FunctionArn"],
         **conn_parameters
     )
     self.assertTrue(result["deleted"])