Beispiel #1
0
def test_list_hashes(dvc):
    odb = ObjectDB(BaseFileSystem())
    odb.fs.path_info = PathInfo("foo")

    with mock.patch.object(odb, "_list_paths", return_value=["12/3456",
                                                             "bar"]):
        hashes = list(odb.list_hashes())
        assert hashes == ["123456"]
Beispiel #2
0
def test_list_hashes(dvc):
    odb = ObjectDB(FileSystem(), None)
    odb.fs_path = "foo"

    with mock.patch.object(
        odb, "_list_paths", return_value=["12/3456", "bar"]
    ):
        hashes = list(odb.list_hashes())
        assert hashes == ["123456"]