Skip to content

Commit

Permalink
Fix: unit tests updated to new fixed encoding.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersulyok committed Mar 10, 2024
1 parent b9eae09 commit 18e37fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand All @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion test/test_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 18e37fc

Please sign in to comment.