python-2 spelling is assertRaisesRegexp
diff --git a/docs/index.txt b/docs/index.txt
index 5ed2d8b..3a321ed 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -144,6 +144,8 @@
- f-strings need to be rewritten using some other string substitution.
+- ``assertRaisesRegex`` needs to be ``assertRaisesRegexp`` for Python 2.
+
Backporting process
-------------------
diff --git a/mock/tests/testmock.py b/mock/tests/testmock.py
index 9b4ee7e..a61dff1 100644
--- a/mock/tests/testmock.py
+++ b/mock/tests/testmock.py
@@ -437,7 +437,7 @@
m = Mock()
m(1)
m(2)
- self.assertRaisesRegex(AssertionError,
+ self.assertRaisesRegexp(AssertionError,
re.escape("Calls: [call(1), call(2)]"),
lambda: m.assert_called_once_with(2))
@@ -1326,7 +1326,7 @@
def test_assert_not_called_message(self):
m = Mock()
m(1, 2)
- self.assertRaisesRegex(AssertionError,
+ self.assertRaisesRegexp(AssertionError,
re.escape("Calls: [call(1, 2)]"),
m.assert_not_called)
@@ -1355,7 +1355,7 @@
m = Mock()
m(1, 2)
m(3)
- self.assertRaisesRegex(AssertionError,
+ self.assertRaisesRegexp(AssertionError,
re.escape("Calls: [call(1, 2), call(3)]"),
m.assert_called_once)