Esempio n. 1
0
    def test_that_when_putting_acl_succeeds_the_put_acl_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_acl(Bucket='mybucket',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
Esempio n. 2
0
    def test_that_when_putting_acl_succeeds_the_put_acl_method_returns_true(self):
        '''
        tests True bucket updated.
        '''
        result = boto_s3_bucket.put_acl(Bucket='mybucket',
                                        **conn_parameters)

        self.assertTrue(result['updated'])
Esempio n. 3
0
    def test_that_when_putting_acl_succeeds_the_put_acl_method_returns_true(
            self):
        """
        tests True bucket updated.
        """
        result = boto_s3_bucket.put_acl(Bucket="mybucket", **conn_parameters)

        self.assertTrue(result["updated"])
def test_that_when_putting_acl_succeeds_the_put_acl_method_returns_true(
        boto_conn):
    '''
    tests True bucket updated.
    '''
    result = boto_s3_bucket.put_acl(Bucket='mybucket',
                                    **pytest.conn_parameters)

    assert result['updated'] is True
Esempio n. 5
0
 def test_that_when_putting_acl_fails_the_put_acl_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_acl.side_effect = ClientError(error_content,
                    'put_bucket_acl')
     result = boto_s3_bucket.put_acl(Bucket='mybucket',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_acl'))
Esempio n. 6
0
 def test_that_when_putting_acl_fails_the_put_acl_method_returns_error(self):
     '''
     tests False bucket not updated.
     '''
     self.conn.put_bucket_acl.side_effect = ClientError(error_content,
                    'put_bucket_acl')
     result = boto_s3_bucket.put_acl(Bucket='mybucket',
                                     **conn_parameters)
     self.assertEqual(result.get('error', {}).get('message'),
                     error_message.format('put_bucket_acl'))
def test_that_when_putting_acl_fails_the_put_acl_method_returns_error(
        boto_conn):
    '''
    tests False bucket not updated.
    '''
    boto_conn.put_bucket_acl.side_effect = exceptions.ClientError(
        error_content, 'put_bucket_acl')
    result = boto_s3_bucket.put_acl(Bucket='mybucket',
                                    **pytest.conn_parameters)
    assert result.get(
        'error', {}).get('message') == error_message.format('put_bucket_acl')
 def test_that_when_putting_acl_fails_the_put_acl_method_returns_error(
         self):
     """
     tests False bucket not updated.
     """
     self.conn.put_bucket_acl.side_effect = ClientError(
         error_content, "put_bucket_acl")
     result = boto_s3_bucket.put_acl(Bucket="mybucket", **conn_parameters)
     assert result.get(
         "error",
         {}).get("message") == error_message.format("put_bucket_acl")