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

Function test_missing_status_and_different_items

tests/unit/sync/test_sync.py:58–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56
57
58def test_missing_status_and_different_items():
59 a = MemoryStorage()
60 b = MemoryStorage()
61
62 status = {}
63 item1 = Item('UID:1\nhaha')
64 item2 = Item('UID:1\nhoho')
65 a.upload(item1)
66 b.upload(item2)
67 with pytest.raises(SyncConflict):
68 sync(a, b, status)
69 assert not status
70 sync(a, b, status, conflict_resolution='a wins')
71 assert items(a) == items(b) == {item1.raw}
72
73
74def test_read_only_and_prefetch():

Callers

nothing calls this directly

Calls 5

uploadMethod · 0.95
MemoryStorageClass · 0.90
ItemClass · 0.90
itemsFunction · 0.85
syncFunction · 0.70

Tested by

no test coverage detected