Example #1
0
    def test_that_when_putting_lifecycle_configuration_succeeds_the_put_lifecycle_configuration_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_lifecycle_configuration(Bucket='mybucket',
                                        Rules='[]',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
Example #2
0
    def test_that_when_putting_lifecycle_configuration_succeeds_the_put_lifecycle_configuration_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_lifecycle_configuration(Bucket='mybucket',
                                        Rules='[]',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
Example #3
0
    def test_that_when_putting_lifecycle_configuration_succeeds_the_put_lifecycle_configuration_method_returns_true(
        self, ):
        """
        tests True bucket updated.
        """
        result = boto_s3_bucket.put_lifecycle_configuration(Bucket="mybucket",
                                                            Rules="[]",
                                                            **conn_parameters)

        self.assertTrue(result["updated"])
Example #4
0
 def test_that_when_putting_lifecycle_configuration_fails_the_put_lifecycle_configuration_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_lifecycle_configuration.side_effect = ClientError(error_content,
                    'put_bucket_lifecycle_configuration')
     result = boto_s3_bucket.put_lifecycle_configuration(Bucket='mybucket',
                                     Rules='[]',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_lifecycle_configuration'))
Example #5
0
 def test_that_when_putting_lifecycle_configuration_fails_the_put_lifecycle_configuration_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_lifecycle_configuration.side_effect = ClientError(error_content,
                    'put_bucket_lifecycle_configuration')
     result = boto_s3_bucket.put_lifecycle_configuration(Bucket='mybucket',
                                     Rules='[]',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_lifecycle_configuration'))
def test_that_when_putting_lifecycle_configuration_fails_the_put_lifecycle_configuration_method_returns_error(
        boto_conn):
    '''
    tests False bucket not updated.
    '''
    boto_conn.put_bucket_lifecycle_configuration.side_effect = exceptions.ClientError(
        error_content, 'put_bucket_lifecycle_configuration')
    result = boto_s3_bucket.put_lifecycle_configuration(
        Bucket='mybucket', Rules='[]', **pytest.conn_parameters)
    assert result.get('error', {}).get('message') == error_message.format(
        'put_bucket_lifecycle_configuration')
 def test_that_when_putting_lifecycle_configuration_fails_the_put_lifecycle_configuration_method_returns_error(
     self, ):
     """
     tests False bucket not updated.
     """
     self.conn.put_bucket_lifecycle_configuration.side_effect = ClientError(
         error_content, "put_bucket_lifecycle_configuration")
     result = boto_s3_bucket.put_lifecycle_configuration(Bucket="mybucket",
                                                         Rules="[]",
                                                         **conn_parameters)
     assert result.get("error", {}).get("message") == error_message.format(
         "put_bucket_lifecycle_configuration")