Skip to content

Commit

Permalink
get_files_number test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Aug 20, 2019
1 parent 8faa02e commit 4bd2ce2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/unit/output/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from dvc.stage import Stage
from dvc.output import OutputLOCAL
from dvc.remote.local import RemoteLOCAL

from tests.basic_env import TestDvc

Expand Down Expand Up @@ -32,8 +33,12 @@ def test_return_0_on_no_cache(self):
self.assertEqual(0, o.get_files_number())

@patch.object(OutputLOCAL, "checksum", "12345678.dir")
@patch.object(OutputLOCAL, "dir_cache", [{"md5": "asdf"}, {"md5": "qwe"}])
def test_return_mutiple_for_dir(self):
@patch.object(
RemoteLOCAL,
"get_dir_cache",
return_value=[{"md5": "asdf"}, {"md5": "qwe"}],
)
def test_return_mutiple_for_dir(self, mock_get_dir_cache):
o = self._get_output()

self.assertEqual(2, o.get_files_number())
Expand Down

0 comments on commit 4bd2ce2

Please sign in to comment.