add test_object_set_get_metadata_empty

This commit is contained in:
Stephon Striplin 2011-07-11 12:14:06 -07:00
parent a214dd4e1d
commit 56aeecce8c

View file

@ -309,6 +309,17 @@ def test_object_set_get_metadata():
eq(got, 'mymeta') eq(got, 'mymeta')
def test_object_set_get_metadata_empty():
bucket = get_new_bucket()
key = boto.s3.key.Key(bucket)
key.key = ('foo')
key.set_metadata('meta1', '')
key.set_contents_from_string('bar')
key2 = bucket.get_key('foo')
got = key2.get_metadata('meta1')
eq(got, '')
def test_object_write_file(): def test_object_write_file():
# boto Key.set_contents_from_file / .send_file uses Expect: # boto Key.set_contents_from_file / .send_file uses Expect:
# 100-Continue, so this test exercises that (though a bit too # 100-Continue, so this test exercises that (though a bit too