Fix storage replication for CAS and add tests

This commit is contained in:
Joseph Schorr 2016-07-11 14:33:29 -04:00
parent 3044f8ecbd
commit 5cd793331e
3 changed files with 86 additions and 11 deletions

View file

@ -58,7 +58,6 @@ class FakeStorage(BaseStorageV2):
def exists(self, path):
if _FAKE_STORAGE_MAP.get('all_files_exist', None):
return True
return path in _FAKE_STORAGE_MAP
def get_checksum(self, path):
@ -83,3 +82,7 @@ class FakeStorage(BaseStorageV2):
def cancel_chunked_upload(self, uuid, _):
_FAKE_STORAGE_MAP.pop(uuid, None)
def copy_to(self, destination, path):
content = self.get_content(path)
destination.put_content(path, content)