Merge pull request #88 from andrewgaul/head-zero-bytes

Add test for HEAD of a zero-byte object

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
Yehuda Sadeh 2015-12-18 09:57:19 -08:00
commit a85b279bdc

View file

@ -997,6 +997,18 @@ def test_multi_object_delete():
eq(len(result.errors), 0)
eq(len(bucket.get_all_keys()), 0)
@attr(resource='object')
@attr(method='put')
@attr(operation='write zero-byte key')
@attr(assertion='correct content length')
def test_object_head_zero_bytes():
bucket = get_new_bucket()
key = bucket.new_key('foo')
key.set_contents_from_string('')
key2 = bucket.get_key('foo')
eq(key2.content_length, '0')
@attr(resource='object')
@attr(method='put')
@attr(operation='write key')