Temporary fix to allow for writing empty strings to s3 keys. Closes #6.
This commit is contained in:
parent
e677193753
commit
756955b61e
2 changed files with 24 additions and 4 deletions
|
|
@ -51,6 +51,17 @@ def test_missing_key_urllib2():
|
|||
urllib2.urlopen.when.called_with("http://foobar.s3.amazonaws.com/the-key").should.throw(urllib2.HTTPError)
|
||||
|
||||
|
||||
@mock_s3
|
||||
def test_empty_key():
|
||||
conn = boto.connect_s3('the_key', 'the_secret')
|
||||
bucket = conn.create_bucket("foobar")
|
||||
key = Key(bucket)
|
||||
key.key = "the-key"
|
||||
key.set_contents_from_string("")
|
||||
|
||||
bucket.get_key("the-key").get_contents_as_string().should.equal('')
|
||||
|
||||
|
||||
@mock_s3
|
||||
def test_copy_key():
|
||||
conn = boto.connect_s3('the_key', 'the_secret')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue