diff --git a/tests/test_diff.py b/tests/test_diff.py index 935697c0b..8e823b815 100644 --- a/tests/test_diff.py +++ b/tests/test_diff.py @@ -1,5 +1,7 @@ from __future__ import unicode_literals + import os +from mock import patch from dvc.main import main @@ -41,8 +43,11 @@ class TestDiffRepo(TestDiff): class TestDiffCmdLine(TestDiff): def test(self): - ret = main(["diff", self.new_file, str(self.a_ref)]) - self.assertEqual(ret, 0) + with patch("dvc.repo.Repo", config="testing") as MockRepo: + MockRepo.return_value.diff.return_value = "testing" + MockRepo.return_value.diff.return_value = "testing" + ret = main(["diff", "-t", self.new_file, str(self.a_ref)]) + self.assertEqual(ret, 0) class TestDiffDir(TestDvc):