def test_upload_big_file(self):
    bucket_name = ('bucket-big-file-%s' % short_uid())
    key1 = 'test_key1'
    key2 = 'test_key1'
    self.s3_client.create_bucket(Bucket=bucket_name)
    body1 = ('\x01' * 10000000)
    rs = self.s3_client.put_object(Bucket=bucket_name, Key=key1, Body=body1)
    self.assertEqual(rs['ResponseMetadata']['HTTPStatusCode'], 200)
    body2 = ('a' * 10000000)
    rs = self.s3_client.put_object(Bucket=bucket_name, Key=key2, Body=body2)
    self.assertEqual(rs['ResponseMetadata']['HTTPStatusCode'], 200)
    rs = self.s3_client.head_object(Bucket=bucket_name, Key=key1)
    self.assertEqual(rs['ContentLength'], len(body1))
    rs = self.s3_client.head_object(Bucket=bucket_name, Key=key2)
    self.assertEqual(rs['ContentLength'], len(body2))
    self._delete_bucket(bucket_name, [key1, key2])
def test_upload_big_file(self):
    bucket_name = ('bucket-big-file-%s' % short_uid())
    key1 = 'test_key1'
    key2 = 'test_key1'
    self.s3_client.create_bucket(Bucket=bucket_name)
    body1 = ('\x01' * 10000000)
    rs = self.s3_client.put_object(Bucket=bucket_name, Key=key1, Body=body1)
    self.assertEqual(rs['ResponseMetadata']['HTTPStatusCode'], 200)
    body2 = ('a' * 10000000)
    rs = self.s3_client.put_object(Bucket=bucket_name, Key=key2, Body=body2)
    self.assertEqual(rs['ResponseMetadata']['HTTPStatusCode'], 200)
    rs = self.s3_client.head_object(Bucket=bucket_name, Key=key1)
    self.assertEqual(rs['ContentLength'], len(body1))
    rs = self.s3_client.head_object(Bucket=bucket_name, Key=key2)
    self.assertEqual(rs['ContentLength'], len(body2))
    self._delete_bucket(bucket_name, [key1, key2])