MCPcopy
hub / github.com/pimutils/vdirsyncer / test_split_contacts

Function test_split_contacts

tests/unit/utils/test_vobject.py:136–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134
135
136def test_split_contacts():
137 bare = '\r\n'.join([VCARD_TEMPLATE.format(r=x, uid=x) for x in range(4)])
138 with_wrapper = 'BEGIN:VADDRESSBOOK\r\n' + bare + '\nEND:VADDRESSBOOK\r\n'
139
140 for _ in (bare, with_wrapper):
141 split = list(vobject.split_collection(bare))
142 assert len(split) == 4
143 assert vobject.join_collection(split).splitlines() == \
144 with_wrapper.splitlines()
145
146
147def test_hash_item():

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected