autotest_quickmerge: fix under Python 3
UnboundMethodType as a concept no longer exists. It's just a
function type now. Switch the code to use callable instead.
BUG=chromium:997354
TEST=`./run_tests` passes
Change-Id: I355adf02d8a6baa6c22cea2e0da048712f27c16b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1869502
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/autotest_quickmerge_unittest.py b/scripts/autotest_quickmerge_unittest.py
index 5d485a1..73697fa 100644
--- a/scripts/autotest_quickmerge_unittest.py
+++ b/scripts/autotest_quickmerge_unittest.py
@@ -7,8 +7,6 @@
from __future__ import print_function
-import types
-
import mock
from chromite.lib import cros_test_lib
@@ -192,6 +190,6 @@
self.fail('Required writeContentsToContentsFile function does '
'not exist.')
- self.assertIsInstance(f, types.UnboundMethodType,
- 'Required writeContentsToContentsFile is not '
- 'a function.')
+ self.assertTrue(
+ callable(f),
+ msg='Required writeContentsToContentsFile is not a function.')