diff options
author | Dillon Brock <okay19@users.noreply.github.com> | 2017-03-05 17:27:06 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-05 17:27:06 (GMT) |
commit | c6b448b36d22769c684bb3276f85c1b47d15ab63 (patch) | |
tree | e5aab1fdddb57feb3d2fdc6c90ebd8cb19144c0a | |
parent | b4e1b92aabcd302ac54fa58cd4fee8a138dbb5aa (diff) | |
download | cpython-c6b448b36d22769c684bb3276f85c1b47d15ab63.zip cpython-c6b448b36d22769c684bb3276f85c1b47d15ab63.tar.gz cpython-c6b448b36d22769c684bb3276f85c1b47d15ab63.tar.bz2 |
Change assertRaises to assertRaisesRegex in test_xmlrpc (#481)
-rw-r--r-- | Lib/test/test_xmlrpc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py index 57a1efc..74a46ba 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',)) |