summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/ganeti/files/ganeti-2.15-python-mock.patch')
-rw-r--r--app-emulation/ganeti/files/ganeti-2.15-python-mock.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/app-emulation/ganeti/files/ganeti-2.15-python-mock.patch b/app-emulation/ganeti/files/ganeti-2.15-python-mock.patch
new file mode 100644
index 000000000000..e51525b89cd7
--- /dev/null
+++ b/app-emulation/ganeti/files/ganeti-2.15-python-mock.patch
@@ -0,0 +1,26 @@
+diff --git a/test/py/cmdlib/test_unittest.py b/test/py/cmdlib/test_unittest.py
+index f93f99d..2d0d083 100644
+--- a/test/py/cmdlib/test_unittest.py
++++ b/test/py/cmdlib/test_unittest.py
+@@ -85,7 +85,7 @@ class TestLUTestDelay(CmdlibTestCase):
+
+ self.ExecOpCode(op)
+
+- self.rpc.call_test_delay.assert_called_once()
++ assert self.rpc.call_test_delay.called
+
+ def testFailingRpc(self):
+ op = opcodes.OpTestDelay(duration=DELAY_DURATION,
+diff --git a/test/py/testutils/__init__.py b/test/py/testutils/__init__.py
+index 27ca425..04ea0ee 100644
+--- a/test/py/testutils/__init__.py
++++ b/test/py/testutils/__init__.py
+@@ -242,7 +242,7 @@ def patch_object(*args, **kwargs):
+ This function unifies the different variations.
+
+ """
+- import mock
++ from mock import mock
+ try:
+ # pylint: disable=W0212
+ return mock._patch_object(*args, **kwargs)