Skip to content

Commit

Permalink
test/pybind/test_rados.py: expand test_xattrs/test_obj_xattrs
Browse files Browse the repository at this point in the history
to cover attribute with empty value case.

Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
(cherry picked from commit b79107d)
  • Loading branch information
guzhongyan authored and Prashant D committed Feb 8, 2018
1 parent e2f57c4 commit cd7946f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/pybind/test_rados.py
Expand Up @@ -369,7 +369,7 @@ def test_list_ns_objects(self):
('ns1', 'ns1-c'), ('ns1', 'ns1-d')])

def test_xattrs(self):
xattrs = dict(a=b'1', b=b'2', c=b'3', d=b'a\0b', e=b'\0')
xattrs = dict(a=b'1', b=b'2', c=b'3', d=b'a\0b', e=b'\0', f='')
self.ioctx.write('abc', b'')
for key, value in xattrs.items():
self.ioctx.set_xattr('abc', key, value)
Expand All @@ -380,7 +380,7 @@ def test_xattrs(self):
eq(stored_xattrs, xattrs)

def test_obj_xattrs(self):
xattrs = dict(a=b'1', b=b'2', c=b'3', d=b'a\0b', e=b'\0')
xattrs = dict(a=b'1', b=b'2', c=b'3', d=b'a\0b', e=b'\0', f='')
self.ioctx.write('abc', b'')
obj = list(self.ioctx.list_objects())[0]
for key, value in xattrs.items():
Expand Down

0 comments on commit cd7946f

Please sign in to comment.