MCPcopy
hub / github.com/borgbackup/borg / MockCache

Class MockCache

src/borg/testsuite/archive_test.py:146–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144
145
146class MockCache:
147 class MockRepo:
148 def async_response(self, wait=True):
149 pass
150
151 def __init__(self):
152 self.objects = {}
153 self.repository = self.MockRepo()
154
155 def add_chunk(self, id, meta, data, stats=None, wait=True, ro_type=None):
156 assert ro_type is not None
157 self.objects[id] = data
158 return id, len(data)
159
160
161def test_cache_chunk_buffer():

Callers 2

test_cache_chunk_bufferFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_cache_chunk_bufferFunction · 0.68