diff --git a/test/test_data.py b/test/test_data.py index 0524eeb..43229ff 100644 --- a/test/test_data.py +++ b/test/test_data.py @@ -238,7 +238,7 @@ def create_partitions(self, disk_idx: int, part_num: int) -> None: if " " in part_label: part_label = part_label.replace(" ", "\\x20") if part_label: - part.bypartlabel_path = "/dev/disk/by-partlabel/" + part.part_label + part.bypartlabel_path = "/dev/disk/by-partlabel/" + part_label else: part.bypartlabel_path = "" part.part_scheme = random.choice(["gtp", "mbr"]) @@ -261,7 +261,7 @@ def create_partitions(self, disk_idx: int, part_num: int) -> None: fs_label = fs_label.replace(" ", "_") fs_label_enc = fs_label_enc.replace(" ", "\\x20") if fs_label: - part.bylabel_path = "/dev/disk/by-label/" + part.fs_label + part.bylabel_path = "/dev/disk/by-label/" + fs_label_enc else: part.bylabel_path = "" part.fs_uuid = str(uuid.uuid4()) diff --git a/test/test_partition.py b/test/test_partition.py index a9ad9e4..8f10e4d 100644 --- a/test/test_partition.py +++ b/test/test_partition.py @@ -146,7 +146,7 @@ def mocked_run(*args, **kwargs): Partition(part_name, part_devid) self.assertTrue(type(cm.exception) in exceptions, error) - def test_init_file(self): + def test_init(self): """Unit test for Partition.__init__() method.""" # Test an HDD with 4 partitions.