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

Function test_ident_conflict

tests/unit/sync/test_sync.py:415–428  ·  view source on GitHub ↗
(sync_inbetween)

Source from the content-addressed store, hash-verified

413
414@pytest.mark.parametrize('sync_inbetween', (True, False))
415def test_ident_conflict(sync_inbetween):
416 a = MemoryStorage()
417 b = MemoryStorage()
418 status = {}
419 href_a, etag_a = a.upload(Item('UID:aaa'))
420 href_b, etag_b = a.upload(Item('UID:bbb'))
421 if sync_inbetween:
422 sync(a, b, status)
423
424 a.update(href_a, Item('UID:xxx'), etag_a)
425 a.update(href_b, Item('UID:xxx'), etag_b)
426
427 with pytest.raises(IdentConflict):
428 sync(a, b, status)
429
430
431def test_moved_href():

Callers

nothing calls this directly

Calls 5

uploadMethod · 0.95
updateMethod · 0.95
MemoryStorageClass · 0.90
ItemClass · 0.90
syncFunction · 0.70

Tested by

no test coverage detected