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

Method upload

vdirsyncer/storage/memory.py:43–49  ·  view source on GitHub ↗
(self, item)

Source from the content-addressed store, hash-verified

41 return href in self.items
42
43 def upload(self, item):
44 href = self._get_href(item)
45 if href in self.items:
46 raise exceptions.AlreadyExistingError(existing_href=href)
47 etag = _random_string()
48 self.items[href] = (etag, item)
49 return href, etag
50
51 def update(self, href, item, etag):
52 if href not in self.items:

Callers 15

test_repair_unsafe_uidsFunction · 0.95
test_missing_statusFunction · 0.95
test_partial_sync_errorFunction · 0.95
test_partial_sync_ignoreFunction · 0.95
test_upload_and_updateFunction · 0.95
test_deletionFunction · 0.95
test_insert_hashFunction · 0.95
test_already_syncedFunction · 0.95

Calls 2

_get_hrefMethod · 0.95
_random_stringFunction · 0.85

Tested by 15

test_repair_unsafe_uidsFunction · 0.76
test_missing_statusFunction · 0.76
test_partial_sync_errorFunction · 0.76
test_partial_sync_ignoreFunction · 0.76
test_upload_and_updateFunction · 0.76
test_deletionFunction · 0.76
test_insert_hashFunction · 0.76
test_already_syncedFunction · 0.76