@@ -359,7 +359,7 @@ The module name can be 'dotted', in the form ``package.module`` if needed:
359359
360360A nice pattern is to actually decorate test methods themselves:
361361
362- >>> class MyTest (unittest2 .TestCase ):
362+ >>> class MyTest (unittest .TestCase ):
363363 ... @ patch.object(SomeClass, ' attribute' , sentinel.attribute)
364364 ... def test_something (self ):
365365 ... self .assertEqual(SomeClass.attribute, sentinel.attribute)
@@ -372,7 +372,7 @@ If you want to patch with a Mock, you can use :func:`patch` with only one argume
372372(or :func: `patch.object ` with two arguments). The mock will be created for you and
373373passed into the test function / method:
374374
375- >>> class MyTest (unittest2 .TestCase ):
375+ >>> class MyTest (unittest .TestCase ):
376376 ... @ patch.object(SomeClass, ' static_method' )
377377 ... def test_something (self , mock_method ):
378378 ... SomeClass.static_method()
@@ -382,7 +382,7 @@ passed into the test function / method:
382382
383383You can stack up multiple patch decorators using this pattern:
384384
385- >>> class MyTest (unittest2 .TestCase ):
385+ >>> class MyTest (unittest .TestCase ):
386386 ... @ patch(' package.module.ClassName1' )
387387 ... @ patch(' package.module.ClassName2' )
388388 ... def test_something (self , MockClass2 , MockClass1 ):
0 commit comments