Skip to content

Commit

Permalink
tests: Fix smartmontools parsing of /dev/random
Browse files Browse the repository at this point in the history
Not the best test case, garbage data may vary.
  • Loading branch information
tbzatek committed Jun 20, 2024
1 parent 477a9a7 commit 62677cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/smartmontools_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def test_ata_real_dumps_by_blob(self):
for d in ["/dev/zero", "/dev/random"]:
with open(d, "rb") as f:
content = f.read(1024)
msg = r"Error getting ATA SMART info: (Empty response|JSON data must be UTF-8 encoded)"
msg = r"Error getting ATA SMART info: (Empty response|JSON data must be UTF-8 encoded|.*unexpected character.*)"
with self.assertRaisesRegex(GLib.GError, msg):
BlockDev.smart_ata_get_info_from_data(content)

Expand Down

0 comments on commit 62677cf

Please sign in to comment.