Commit b9d154c0 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[test] Use new remote test base class and remove common tests implemented

parent a4f0e1c0
......@@ -49,27 +49,8 @@ from . import tmp_prefix
class TestOnlinAlgorithms(core.OnlineAssetTestCase):
asset_type = "algorithm"
@slow
@core.skip_disconnected
def test_remote_list(self):
exit_code, outputs = self.call("list", "--remote")
nose.tools.eq_(exit_code, 0, msg=outputs)
@slow
@core.skip_disconnected
def test_pull_one(self):
obj = "user/integers_add/1"
exit_code, outputs = self.call("pull", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, outputs)
s = Storage(tmp_prefix, obj)
nose.tools.assert_true(s.exists())
@slow
@core.skip_disconnected
def test_pull_all(self):
exit_code, outputs = self.call("pull", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, outputs)
storage_cls = Storage
object_map = {"pull": "user/integers_add/1"}
@slow
@core.skip_disconnected
......
......@@ -71,28 +71,8 @@ class TestDatabaseLocal(core.AssetLocalTest):
class TestOnlinDatabases(core.OnlineAssetTestCase):
asset_type = "database"
@slow
@core.skip_disconnected
def test_remote_list(self):
exit_code, outputs = self.call("list", "--remote")
nose.tools.eq_(exit_code, 0, outputs)
@slow
@core.skip_disconnected
def test_pull_one(self):
obj = "simple/1"
exit_code, outputs = self.call("pull", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, outputs)
s = Storage(tmp_prefix, obj)
nose.tools.assert_true(s.exists())
@slow
@core.skip_disconnected
def test_pull_all(self):
exit_code, outputs = self.call("pull", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, outputs)
storage_cls = Storage
object_map = {"pull": "simple/1"}
@slow
@core.skip_disconnected
......
......@@ -48,27 +48,8 @@ from . import tmp_prefix
class TestOnlineDataformats(core.OnlineAssetTestCase):
asset_type = "dataformat"
@slow
@core.skip_disconnected
def test_remote_list(self):
exit_code, output = self.call("list", "--remote")
nose.tools.eq_(exit_code, 0, output)
@slow
@core.skip_disconnected
def test_pull_one(self):
obj = "system/bounding_box_video/1"
exit_code, output = self.call("pull", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
s = Storage(tmp_prefix, obj)
nose.tools.assert_true(s.exists())
@slow
@core.skip_disconnected
def test_pull_all(self):
exit_code, output = self.call("pull", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
storage_cls = Storage
object_map = {"pull": "system/bounding_box_video/1"}
@slow
@core.skip_disconnected
......
......@@ -62,29 +62,8 @@ def setup_experiments():
class TestOnlineExperiments(core.OnlineAssetTestCase):
asset_type = "experiment"
@slow
@core.skip_disconnected
def test_remote_list(self):
exit_code, outputs = self.call("list", "--remote")
nose.tools.eq_(exit_code, 0, outputs)
@slow
@core.skip_disconnected
def test_pull_one(self, obj=None):
obj = obj or "user/user/single/1/single"
exit_code, outputs = self.call("pull", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, outputs)
s = Storage(tmp_prefix, obj)
nose.tools.assert_true(s.exists())
return s
@slow
@core.skip_disconnected
def test_pull_all(self):
exit_code, outputs = self.call("pull", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, outputs)
storage_cls = Storage
object_map = {"pull": "user/user/single/1/single"}
@slow
@core.skip_disconnected
......
......@@ -61,27 +61,8 @@ class TestLibraryLocal(core.AssetLocalTest):
class TestOnlineLibraries(core.OnlineAssetTestCase):
asset_type = "library"
@slow
@core.skip_disconnected
def test_remote_list(self):
exit_code, output = self.call("list", "--remote")
nose.tools.eq_(exit_code, 0, output)
@slow
@core.skip_disconnected
def test_pull_one(self):
obj = "plot/baselib/1"
exit_code, output = self.call("pull", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
s = Storage(tmp_prefix, obj)
nose.tools.assert_true(s.exists())
@slow
@core.skip_disconnected
def test_pull_all(self):
exit_code, output = self.call("pull", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
storage_cls = Storage
object_map = {"pull": "plot/baselib/1"}
@slow
@core.skip_disconnected
......
......@@ -36,35 +36,16 @@
# Basic tests for the command line beat program: plotterparameters
import os
import nose.tools
from beat.core.plotterparameter import Storage
from beat.core.test.utils import slow
from . import core
from . import tmp_prefix
class TestOnlinePlotterParameters(core.OnlineAssetTestCase):
asset_type = "plotterparameters"
@slow
@core.skip_disconnected
def test_pull_one(self, obj=None):
obj = obj or "plot/bar/1"
exit_code, output = self.call("pull", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
nose.tools.assert_true(
os.path.exists(os.path.join(tmp_prefix, "plotterparameters", obj + ".json"))
)
@slow
@core.skip_disconnected
def test_pull_all(self):
exit_code, output = self.call("pull", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
storage_cls = Storage
object_map = {"pull": "plot/bar/1"}
class TestPlotterparameterLocal(core.AssetLocalTest):
......
......@@ -51,17 +51,8 @@ from . import tmp_prefix
class TestOnlinePlotters(core.OnlineAssetTestCase):
asset_type = "plotter"
@slow
@core.skip_disconnected
def test_pull_one(self, obj=None):
obj = obj or "plot/bar/1"
exit_code, output = self.call("pull", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
s = Storage(tmp_prefix, obj)
nose.tools.assert_true(s.exists())
return s
storage_cls = Storage
object_map = {"pull": "plot/bar/1"}
@slow
@core.skip_disconnected
......@@ -85,12 +76,6 @@ class TestOnlinePlotters(core.OnlineAssetTestCase):
nose.tools.assert_true(s.exists())
return s
@slow
@core.skip_disconnected
def test_pull_all(self):
exit_code, output = self.call("pull", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
@slow
@core.skip_disconnected
def test_plot_sample_data_no_output_name(self):
......
......@@ -49,27 +49,8 @@ from . import tmp_prefix
class TestOnlineToolchains(core.OnlineAssetTestCase):
asset_type = "toolchain"
@slow
@core.skip_disconnected
def test_remote_list(self):
exit_code, output = self.call("list", "--remote")
nose.tools.eq_(exit_code, 0, output)
@slow
@core.skip_disconnected
def test_pull_one(self, obj=None):
obj = obj or "user/single/1"
exit_code, output = self.call("pull", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
s = Storage(tmp_prefix, obj)
nose.tools.assert_true(s.exists())
@slow
@core.skip_disconnected
def test_pull_all(self):
exit_code, output = self.call("pull", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
storage_cls = Storage
object_map = {"pull": "user/single/1"}
@slow
@core.skip_disconnected
......
Supports Markdown
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