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

Function test_replace_uid

tests/unit/utils/test_vobject.py:220–226  ·  view source on GitHub ↗
(template, uid)

Source from the content-addressed store, hash-verified

218 VCARD_TEMPLATE])
219@given(uid=st.one_of(st.none(), uid_strategy))
220def test_replace_uid(template, uid):
221 item = vobject.Item(template.format(r=123, uid=123)).with_uid(uid)
222 assert item.uid == uid
223 if uid:
224 assert item.raw.count('\nUID:{}'.format(uid)) == 1
225 else:
226 assert '\nUID:' not in item.raw
227
228
229def test_broken_item():

Callers

nothing calls this directly

Calls 1

with_uidMethod · 0.80

Tested by

no test coverage detected