summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2017-03-15 11:12:53 (GMT)
committerGitHub <noreply@github.com>2017-03-15 11:12:53 (GMT)
commit78add3309b53d68c2c5c118ec63f7485bbf93c9a (patch)
treee4bb96173ef843c3b0cb6a81213c0dc870f0ca18 /Lib/test
parent02c6fa573a0a7f417e21ad9e81bcff3ac61a9fa8 (diff)
downloadcpython-78add3309b53d68c2c5c118ec63f7485bbf93c9a.zip
cpython-78add3309b53d68c2c5c118ec63f7485bbf93c9a.tar.gz
cpython-78add3309b53d68c2c5c118ec63f7485bbf93c9a.tar.bz2
Change assertRaises to assertRaisesRegex in test_xmlrpc (#481) (#674)
(cherry picked from commit c6b448b36d22769c684bb3276f85c1b47d15ab63)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_xmlrpc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
index 69de08e..30025e3 100644
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -412,7 +412,7 @@ class SimpleXMLRPCDispatcherTestCase(unittest.TestCase):
dispatcher = xmlrpc.server.SimpleXMLRPCDispatcher()
dispatcher.register_function(None, name='method')
- with self.assertRaises(Exception, expected_regex='method'):
+ with self.assertRaisesRegex(Exception, 'method'):
dispatcher._dispatch('method', ('param',))
def test_instance_has_no_func(self):
@@ -420,14 +420,14 @@ class SimpleXMLRPCDispatcherTestCase(unittest.TestCase):
dispatcher = xmlrpc.server.SimpleXMLRPCDispatcher()
dispatcher.register_instance(object())
- with self.assertRaises(Exception, expected_regex='method'):
+ with self.assertRaisesRegex(Exception, 'method'):
dispatcher._dispatch('method', ('param',))
def test_cannot_locate_func(self):
"""Calls a function that the dispatcher cannot locate"""
dispatcher = xmlrpc.server.SimpleXMLRPCDispatcher()
- with self.assertRaises(Exception, expected_regex='method'):
+ with self.assertRaisesRegex(Exception, 'method'):
dispatcher._dispatch('method', ('param',))