Skip to content

Commit c357246

Browse files
Politie-SOCMiauwkeru
authored andcommitted
Adjust tests for target.py to adhere to filesystem changes
1 parent 51e8071 commit c357246

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_target.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def mocked_win_volumes_fs() -> Iterator[tuple[Mock, Mock, Mock]]:
224224
mock_good_volume.drive_letter = "W"
225225

226226
mock_good_fs = Mock(name="good-fs")
227+
mock_good_fs.__type__ = "mock"
227228
mock_good_fs.iter_subfs.return_value = []
228229

229230
def mock_filesystem_open(volume: Mock) -> Mock:
@@ -581,7 +582,9 @@ def test_empty_volume_log(target_bare: Target, caplog: pytest.LogCaptureFixture)
581582
@pytest.mark.parametrize("nr_of_fs", [1, 2])
582583
def test_fs_mount_others(target_unix: Target, nr_of_fs: int) -> None:
583584
for _ in range(nr_of_fs):
584-
target_unix.filesystems.add(Mock())
585+
fs = Mock()
586+
fs.__type__ = "mock"
587+
target_unix.filesystems.add(fs)
585588

586589
target_unix._mount_others()
587590

@@ -595,7 +598,9 @@ def test_fs_mount_others(target_unix: Target, nr_of_fs: int) -> None:
595598
@pytest.mark.parametrize("nr_of_fs", [1, 2])
596599
def test_fs_mount_already_there(target_unix: Target, nr_of_fs: int) -> None:
597600
for idx in range(nr_of_fs):
598-
target_unix.filesystems.add(Mock())
601+
fs = Mock()
602+
fs.__type__ = "mock"
603+
target_unix.filesystems.add(fs)
599604
target_unix._mount_others()
600605

601606
assert f"/$fs$/fs{idx}" in target_unix.fs.mounts

0 commit comments

Comments
 (0)