Commit 6103410d authored by Samuel GAIST's avatar Samuel GAIST

[test][experiments] Use AssetLocalTest for local only tests

parent 2b25ea13
......@@ -50,8 +50,6 @@ from beat.core.algorithm import Storage as AlgStorage
from beat.core.dataformat import Storage as DFStorage
from beat.core.database import Storage as DBStorage
from ..common import Selector
from .utils import index_experiment_dbs, MockLoggingHandler
from . import core
......@@ -63,6 +61,28 @@ def setup_experiments():
class TestLocal(core.AssetLocalTest):
storage_cls = Storage
asset_type = "experiment"
object_map = {
"valid": "user/user/single/1/single",
"invalid": "user/user/single/1/does_not_exist",
"create": "user/user/single/1/single",
"fork": "user/user/unknown/1/forked_obj",
def create(cls, obj=None):
"""Can't create from scratch so copy an object of the tests"""
src_storage = cls.storage_cls(prefix, obj)
dst_storage = cls.storage_cls(tmp_prefix, obj)*src_storage.load())
def test_create(self, obj=None):
nose.SkipTest("Experiment can't be created")
class TestOnline(core.OnlineAssetTestCase):
asset_type = "experiment"
......@@ -100,29 +120,6 @@ class TestOnline(core.OnlineAssetTestCase):
dst_storage = storage_cls(tmp_prefix, asset)*src_storage.load())
def test_fork(self, obj=None, obj2=None):
obj = obj or "user/user/single/1/single"
obj2 = obj2 or "user/user/single/1/different"
exit_code, outputs ="fork", obj, obj2, prefix=tmp_prefix), 0, outputs)
s = Storage(tmp_prefix, obj2)
# check fork status
with Selector(tmp_prefix) as selector:"experiment", obj2), obj)
def test_delete_local(self):
obj = "user/user/single/1/single"
storage = self.test_pull_one(obj)
exit_code, outputs ="rm", obj, prefix=tmp_prefix), 0, outputs)
def test_draw(self):
obj = "user/user/double_triangle/1/double_triangle"
......@@ -170,20 +167,6 @@ class TestOnline(core.OnlineAssetTestCase):, 0, outputs)
class TestValidity(core.AssetBaseTest):
asset_type = "experiment"
def test_check_valid(self):
obj = "user/user/single/1/single"
exit_code, outputs ="check", obj), 0, outputs)
def test_check_invalid(self):
obj = "user/user/single/1/does_not_exist"
exit_code, outputs ="check", obj), 1, outputs)
class TestCache(core.AssetBaseTest):
asset_type = "experiment"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment