@@ -364,22 +364,22 @@ def test_registered_func_is_none(self):
364
364
365
365
dispatcher = xmlrpc .server .SimpleXMLRPCDispatcher ()
366
366
dispatcher .register_function (None , name = 'method' )
367
- with self .assertRaises (Exception , expected_regex = 'method' ):
367
+ with self .assertRaisesRegex (Exception , 'method' ):
368
368
dispatcher ._dispatch ('method' , ('param' ,))
369
369
370
370
def test_instance_has_no_func (self ):
371
371
"""Attempts to call nonexistent function on a registered instance"""
372
372
373
373
dispatcher = xmlrpc .server .SimpleXMLRPCDispatcher ()
374
374
dispatcher .register_instance (object ())
375
- with self .assertRaises (Exception , expected_regex = 'method' ):
375
+ with self .assertRaisesRegex (Exception , 'method' ):
376
376
dispatcher ._dispatch ('method' , ('param' ,))
377
377
378
378
def test_cannot_locate_func (self ):
379
379
"""Calls a function that the dispatcher cannot locate"""
380
380
381
381
dispatcher = xmlrpc .server .SimpleXMLRPCDispatcher ()
382
- with self .assertRaises (Exception , expected_regex = 'method' ):
382
+ with self .assertRaisesRegex (Exception , 'method' ):
383
383
dispatcher ._dispatch ('method' , ('param' ,))
384
384
385
385
0 commit comments