Commit 5825cdd8 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[test][core] Centralize diff and status tests

parent 9b71e308
......@@ -228,6 +228,10 @@ class AssetRemoteTest(AssetBaseTest):
super().__init__()
nose.tools.assert_true(self.object_map)
def _modify_asset(self, asset_name):
"""Modify an asset"""
raise NotImplementedError
@slow
@skip_disconnected
def test_remote_list(self):
......@@ -250,6 +254,27 @@ class AssetRemoteTest(AssetBaseTest):
exit_code, output = self.call("pull", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
@slow
@skip_disconnected
def test_diff(self):
obj = self.object_map["diff"]
exit_code, output = self.call("pull", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
# quickly modify the user library by emptying it
self._modify_asset(obj)
exit_code, output = self.call("diff", obj, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
@slow
@skip_disconnected
def test_status(self):
self.test_diff()
self.test_pull_one()
exit_code, output = self.call("status", prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
class OnlineTestMixin:
"""Mixin for using Django's live server"""
......
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