Cleanup metadata setting and add fix for multipart uploads. Closes #274.
This commit is contained in:
parent
6331c2e1f1
commit
3a82f089a2
4 changed files with 60 additions and 43 deletions
|
|
@ -87,6 +87,20 @@ def test_multipart_upload():
|
|||
bucket.get_key("the-key").get_contents_as_string().should.equal(part1 + part2)
|
||||
|
||||
|
||||
@mock_s3
|
||||
def test_multipart_upload_with_headers():
|
||||
conn = boto.connect_s3('the_key', 'the_secret')
|
||||
bucket = conn.create_bucket("foobar")
|
||||
|
||||
multipart = bucket.initiate_multipart_upload("the-key", metadata={"foo": "bar"})
|
||||
part1 = b'0' * 10
|
||||
multipart.upload_part_from_file(BytesIO(part1), 1)
|
||||
multipart.complete_upload()
|
||||
|
||||
key = bucket.get_key("the-key")
|
||||
key.metadata.should.equal({"foo": "bar"})
|
||||
|
||||
|
||||
@mock_s3
|
||||
def test_multipart_upload_with_copy_key():
|
||||
conn = boto.connect_s3('the_key', 'the_secret')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue