diff --git a/test/rhsmlib/dbus/test_register.py b/test/rhsmlib/dbus/test_register.py index e114a257e6..5556d1fe4f 100644 --- a/test/rhsmlib/dbus/test_register.py +++ b/test/rhsmlib/dbus/test_register.py @@ -340,6 +340,13 @@ def setUp(self) -> None: get_cmd_line_mock = get_cmd_line_patch.start() get_cmd_line_mock.return_value = "unit-test sender" + pid_of_sender_patch = mock.patch( + "rhsmlib.dbus.server.pid_of_sender", + autospec=True, + ) + pid_of_sender_mock = pid_of_sender_patch.start() + pid_of_sender_mock.return_value = 123456 + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) def tearDown(self) -> None: