| 144 | |
| 145 | |
| 146 | class 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 | |
| 161 | def test_cache_chunk_buffer(): |
no outgoing calls