Exemplo n.º 1
0
    def test_that_when_putting_versioning_succeeds_the_put_versioning_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_versioning(Bucket='mybucket',
                                        Status='Enabled',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
Exemplo n.º 2
0
    def test_that_when_putting_versioning_succeeds_the_put_versioning_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_versioning(Bucket='mybucket',
                                        Status='Enabled',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
Exemplo n.º 3
0
    def test_that_when_putting_versioning_succeeds_the_put_versioning_method_returns_true(
        self, ):
        """
        tests True bucket updated.
        """
        result = boto_s3_bucket.put_versioning(Bucket="mybucket",
                                               Status="Enabled",
                                               **conn_parameters)

        self.assertTrue(result["updated"])
Exemplo n.º 4
0
 def test_that_when_putting_versioning_fails_the_put_versioning_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_versioning.side_effect = ClientError(error_content,
                    'put_bucket_versioning')
     result = boto_s3_bucket.put_versioning(Bucket='mybucket',
                                     Status='Enabled',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_versioning'))
Exemplo n.º 5
0
 def test_that_when_putting_versioning_fails_the_put_versioning_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_versioning.side_effect = ClientError(error_content,
                    'put_bucket_versioning')
     result = boto_s3_bucket.put_versioning(Bucket='mybucket',
                                     Status='Enabled',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_versioning'))
Exemplo n.º 6
0
def test_that_when_putting_versioning_fails_the_put_versioning_method_returns_error(
        boto_conn):
    '''
    tests False bucket not updated.
    '''
    boto_conn.put_bucket_versioning.side_effect = exceptions.ClientError(
        error_content, 'put_bucket_versioning')
    result = boto_s3_bucket.put_versioning(Bucket='mybucket',
                                           Status='Enabled',
                                           **pytest.conn_parameters)
    assert result.get(
        'error',
        {}).get('message') == error_message.format('put_bucket_versioning')
 def test_that_when_putting_versioning_fails_the_put_versioning_method_returns_error(
     self, ):
     """
     tests False bucket not updated.
     """
     self.conn.put_bucket_versioning.side_effect = ClientError(
         error_content, "put_bucket_versioning")
     result = boto_s3_bucket.put_versioning(Bucket="mybucket",
                                            Status="Enabled",
                                            **conn_parameters)
     assert result.get(
         "error",
         {}).get("message") == error_message.format("put_bucket_versioning")