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

Function test_insert_hash

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

Source from the content-addressed store, hash-verified

194
195
196def test_insert_hash():
197 a = MemoryStorage()
198 b = MemoryStorage()
199 status = {}
200
201 item = Item('UID:1')
202 href, etag = a.upload(item)
203 sync(a, b, status)
204
205 for d in status['1']:
206 del d['hash']
207
208 a.update(href, Item('UID:1\nHAHA:YES'), etag)
209 sync(a, b, status)
210 assert 'hash' in status['1'][0] and 'hash' in status['1'][1]
211
212
213def test_already_synced():

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