File fix-tests.patch of Package python3-tomate

diff -Naur orig/tests/test_app.py tomate-0.12.0/tests/test_app.py
--- orig/tests/test_app.py	2019-02-28 20:44:36.000000000 +0100
+++ tomate-0.12.0/tests/test_app.py	2020-03-17 21:08:06.667872366 +0100
@@ -1,3 +1,4 @@
+import contextlib
 import dbus
 import pytest
 
@@ -24,10 +25,11 @@
 
     assert isinstance(app, Application)
 
-    with mocker.patch(
-        "tomate.app.dbus.SessionBus.return_value.request_name",
-        return_value=dbus.bus.REQUEST_NAME_REPLY_EXISTS,
-    ):
+    with contextlib.ExitStack() as stack:
+        stack.enter_context(mocker.patch(
+            "tomate.app.dbus.SessionBus.return_value.request_name",
+            return_value=dbus.bus.REQUEST_NAME_REPLY_EXISTS,
+        ))
         dbus_app = Application.from_graph(graph)
 
         assert isinstance(dbus_app, dbus.Interface)
openSUSE Build Service is sponsored by