Added a FakeRemoteStorage, for testing purposes
This commit is contained in:
parent
2ecee34f08
commit
d91b5a7c2d
@ -52,6 +52,11 @@ class FakeStorageSystem():
|
|||||||
self.foobie = foobie
|
self.foobie = foobie
|
||||||
self.blech = blech
|
self.blech = blech
|
||||||
|
|
||||||
|
class FakeRemoteStorage(storage.BasicFileStorage):
|
||||||
|
# Theoretically despite this, all the methods should work but it
|
||||||
|
# should force copying to the workbench
|
||||||
|
local_storage = False
|
||||||
|
|
||||||
|
|
||||||
def test_storage_system_from_paste_config():
|
def test_storage_system_from_paste_config():
|
||||||
this_storage = storage.storage_system_from_paste_config(
|
this_storage = storage.storage_system_from_paste_config(
|
||||||
@ -81,9 +86,12 @@ def test_storage_system_from_paste_config():
|
|||||||
# Basic file storage tests
|
# Basic file storage tests
|
||||||
##########################
|
##########################
|
||||||
|
|
||||||
def get_tmp_filestorage(mount_url=None):
|
def get_tmp_filestorage(mount_url=None, fake_remote=False):
|
||||||
tmpdir = tempfile.mkdtemp()
|
tmpdir = tempfile.mkdtemp()
|
||||||
this_storage = storage.BasicFileStorage(tmpdir, mount_url)
|
if fake_remote:
|
||||||
|
this_storage = FakeRemoteStorage(tmpdir, mount_url)
|
||||||
|
else:
|
||||||
|
this_storage = storage.BasicFileStorage(tmpdir, mount_url)
|
||||||
return tmpdir, this_storage
|
return tmpdir, this_storage
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user