From 2d72dc125d289cafb103fba1e7c1131d39d956bd Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 21 Dec 2023 13:00:31 +0100 Subject: [PATCH] test: rename TestFileSystemMountService->FakeFileSystemMountService The rename avoids warnings from pytest. It confuses this for a unittest class apparently. And it's really a `Fake` service anyway. --- test/mod/test_util_mnt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/mod/test_util_mnt.py b/test/mod/test_util_mnt.py index 702b8802..becbdc66 100644 --- a/test/mod/test_util_mnt.py +++ b/test/mod/test_util_mnt.py @@ -24,7 +24,7 @@ def test_mount_guard_failure_msg(tmp_path): # This needs a proper refactor so that FileSystemMountService just uses # a common mount helper. -class TestFileSystemMountService(FileSystemMountService): +class FakeFileSystemMountService(FileSystemMountService): def __init__(self, args=None): # override __init__ to make it testable pass @@ -34,7 +34,7 @@ class TestFileSystemMountService(FileSystemMountService): @pytest.mark.skipif(os.getuid() != 0, reason="root only") def test_osbuild_mount_failure_msg(tmp_path): - mnt_service = TestFileSystemMountService() + mnt_service = FakeFileSystemMountService() # yes, we have a third way of mounting things with pytest.raises(RuntimeError) as e: args = {