diff --git a/tests/utils/test_vobject.py b/tests/utils/test_vobject.py index 265332e..31d1018 100644 --- a/tests/utils/test_vobject.py +++ b/tests/utils/test_vobject.py @@ -127,10 +127,21 @@ def test_split_collection_timezones(): assert given == expected +def test_split_contacts(): + bare = '\r\n'.join([VCARD_TEMPLATE.format(r=x, uid=x) for x in range(4)]) + with_wrapper = 'BEGIN:VADDRESSBOOK\r\n' + bare + '\nEND:VADDRESSBOOK\r\n' + + for x in (bare, with_wrapper): + split = list(vobject.split_collection(bare)) + assert len(split) == 4 + assert vobject.join_collection(split).splitlines() == \ + with_wrapper.splitlines() + + def test_hash_item(): a = EVENT_TEMPLATE.format(r=1, uid=1) b = u'\n'.join(line for line in a.splitlines() - if u'PRODID' not in line and u'VERSION' not in line) + if u'PRODID' not in line) assert vobject.hash_item(a) == vobject.hash_item(b) diff --git a/vdirsyncer/utils/vobject.py b/vdirsyncer/utils/vobject.py index 39b55ff..04c0b55 100644 --- a/vdirsyncer/utils/vobject.py +++ b/vdirsyncer/utils/vobject.py @@ -18,8 +18,6 @@ def _process_properties(*s): IGNORE_PROPS = _process_properties( # PRODID is changed by radicale for some reason after upload 'PRODID', - # VERSION can get lost in singlefile storage - 'VERSION', # X-RADICALE-NAME is used by radicale, because hrefs don't really exist in # their filesystem backend 'X-RADICALE-NAME',