(template, uid)
| 218 | VCARD_TEMPLATE]) |
| 219 | @given(uid=st.one_of(st.none(), uid_strategy)) |
| 220 | def 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 | |
| 229 | def test_broken_item(): |