@@ -412,22 +412,22 @@ def test_registered_func_is_none(self):
412
412
413
413
dispatcher = xmlrpc .server .SimpleXMLRPCDispatcher ()
414
414
dispatcher .register_function (None , name = 'method' )
415
- with self .assertRaises (Exception , expected_regex = 'method' ):
415
+ with self .assertRaisesRegex (Exception , 'method' ):
416
416
dispatcher ._dispatch ('method' , ('param' ,))
417
417
418
418
def test_instance_has_no_func (self ):
419
419
"""Attempts to call nonexistent function on a registered instance"""
420
420
421
421
dispatcher = xmlrpc .server .SimpleXMLRPCDispatcher ()
422
422
dispatcher .register_instance (object ())
423
- with self .assertRaises (Exception , expected_regex = 'method' ):
423
+ with self .assertRaisesRegex (Exception , 'method' ):
424
424
dispatcher ._dispatch ('method' , ('param' ,))
425
425
426
426
def test_cannot_locate_func (self ):
427
427
"""Calls a function that the dispatcher cannot locate"""
428
428
429
429
dispatcher = xmlrpc .server .SimpleXMLRPCDispatcher ()
430
- with self .assertRaises (Exception , expected_regex = 'method' ):
430
+ with self .assertRaisesRegex (Exception , 'method' ):
431
431
dispatcher ._dispatch ('method' , ('param' ,))
432
432
433
433
0 commit comments