From 5bdb25ebb80a598e088c6c9ccf211a9dc9a22baa Mon Sep 17 00:00:00 2001
From: Davide Cavalca <dcavalca@fb.com>
Date: Wed, 30 Dec 2020 10:43:18 -0800
Subject: [PATCH] tests: properly mock yum process name
---
tests/test_yum.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_yum.py b/tests/test_yum.py
index 68340bd..de1ba2a 100644
--- a/tests/test_yum.py
+++ b/tests/test_yum.py
@@ -16,12 +16,12 @@
from dcrpm import pidutil, yum
from tests.mock_process import make_mock_process
-
class TestYum(testslide.TestCase):
def setUp(self):
# type: () -> None
super(TestYum, self).setUp()
self.yum = yum.Yum() # type: yum.Yum
+ self.yum.yum = "fakeyum"
# check_stuck
def test_check_stuck_filenotfound(self):
@@ -91,7 +91,7 @@ def test_check_stuck_kill_yumpid(self):
(
self.mock_callable(pidutil, "process")
.for_call(12345)
- .to_return_value(make_mock_process(pid=12345, open_files=[], name="yum"))
+ .to_return_value(make_mock_process(pid=12345, open_files=[], name="fakeyum"))
.and_assert_called_once()
)
self.assertTrue(self.yum.check_stuck())