Commit 18a6f592 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[test][libraries] Add fork push test setup

parent 774858ae
......@@ -37,9 +37,10 @@
# Basic tests for the command line beat program: protocoltemplates
from beat.core.library import Storage
from beat.core.library import Library
from . import core
from . import tmp_prefix
from . import tmp_prefix, prefix
class TestLibraryLocal(core.AssetLocalTest):
......@@ -62,6 +63,8 @@ class TestOnlineLibraries(core.OnlineAssetTestCase):
"pull": "plot/baselib/1",
"diff": "plot/baselib/1",
"create": "user/newobject/1",
"fork_from": "user/nest1/1",
"fork": "user/forked_obj/1",
"push": "user/nest1/1",
"not_owner_push": "errors/invalid_mix/1",
......@@ -71,3 +74,14 @@ class TestOnlineLibraries(core.OnlineAssetTestCase):
storage = self.storage_cls(tmp_prefix, asset_name)"class Dummy:\n pass")
def _prepare_fork_dependencies(self, asset_name):
library = Library(prefix, asset_name)
if library.uses is not None:
for lib in library.uses.values():
src_storage = self.storage_cls(prefix, lib)
dst_storage = self.storage_cls(tmp_prefix, lib)*src_storage.load())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment