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

Function test_read_only_and_prefetch

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

Source from the content-addressed store, hash-verified

72
73
74def test_read_only_and_prefetch():
75 a = MemoryStorage()
76 b = MemoryStorage()
77 b.read_only = True
78
79 status = {}
80 item1 = Item('UID:1\nhaha')
81 item2 = Item('UID:2\nhoho')
82 a.upload(item1)
83 a.upload(item2)
84
85 sync(a, b, status, force_delete=True)
86 sync(a, b, status, force_delete=True)
87
88 assert not items(a) and not items(b)
89
90
91def test_partial_sync_error():

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