def setUp(self): super(path_existsTestCase, self).setUp() self.addCleanup(patch.stopall) self.mock_isfile = patch.object( verify, 'isfile', autospec=True).start()