Commit 6f82e8cc authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[test][dataformats] Add fork push test setup

parent 5490809e
......@@ -39,7 +39,7 @@
from beat.core.dataformat import Storage, DataFormat
from . import core
from . import tmp_prefix
from . import tmp_prefix, prefix
class TestOnlineDataformats(core.OnlineAssetTestCase):
......@@ -50,6 +50,8 @@ class TestOnlineDataformats(core.OnlineAssetTestCase):
"pull": "system/bounding_box_video/1",
"diff": "system/integer/1",
"create": "user/newobject/1",
"fork_from": "user/composed/1",
"fork": "user/forked_obj/1",
"push": "user/composed/1",
"not_owner_push": "system/chart/1",
......@@ -61,6 +63,17 @@ class TestOnlineDataformats(core.OnlineAssetTestCase):["value"] = "int64"
def _prepare_fork_dependencies(self, asset_name):
dataformat = DataFormat(prefix, asset_name)
for df in dataformat.referenced.keys():
if df.startswith("user"):
src_storage = Storage(prefix, df)
dst_storage = Storage(tmp_prefix, df)*src_storage.load())
class TestDataFormatLocal(core.AssetLocalTest):
storage_cls = Storage
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