def test_current_config(self):
     api_config = {
         'Id': 'test-id',
         'LambdaFunctionArn': 'test-arn',
         'Events': [],
         'Filter': {
             'Key': {
                 'FilterRules': [{
                     'Name': 'Prefix',
                     'Value': ''
                 }, {
                     'Name': 'Suffix',
                     'Value': ''
                 }]
             }
         }
     }
     client = MagicMock()
     client.get_bucket_notification_configuration.return_value = {
         'LambdaFunctionConfigurations': [api_config]
     }
     bucket = AmazonBucket(client, 'test-bucket')
     current = bucket.current_config('test-id')
     assert current.raw == api_config
     assert client.get_bucket_notification_configuration.call_count == 1
 def test_current_config_empty(self):
     client = MagicMock()
     client.get_bucket_notification_configuration.return_value = {
         'LambdaFunctionConfigurations': []
     }
     bucket = AmazonBucket(client, 'test-bucket')
     current = bucket.current_config('test-id')
     assert current is None
     assert client.get_bucket_notification_configuration.call_count == 1