diff -r a442bf076a32 Doc/library/unittest.mock-examples.rst --- a/Doc/library/unittest.mock-examples.rst Fri Apr 01 21:43:54 2016 +0200 +++ b/Doc/library/unittest.mock-examples.rst Fri Apr 01 13:34:53 2016 -0700 @@ -359,7 +359,7 @@ A nice pattern is to actually decorate test methods themselves: - >>> class MyTest(unittest2.TestCase): + >>> class MyTest(unittest.TestCase): ... @patch.object(SomeClass, 'attribute', sentinel.attribute) ... def test_something(self): ... self.assertEqual(SomeClass.attribute, sentinel.attribute) @@ -372,7 +372,7 @@ (or :func:`patch.object` with two arguments). The mock will be created for you and passed into the test function / method: - >>> class MyTest(unittest2.TestCase): + >>> class MyTest(unittest.TestCase): ... @patch.object(SomeClass, 'static_method') ... def test_something(self, mock_method): ... SomeClass.static_method() @@ -382,7 +382,7 @@ You can stack up multiple patch decorators using this pattern: - >>> class MyTest(unittest2.TestCase): + >>> class MyTest(unittest.TestCase): ... @patch('package.module.ClassName1') ... @patch('package.module.ClassName2') ... def test_something(self, MockClass2, MockClass1):