def setUp(self): super(mock_service_exeTestCase, self).setUp() self.addCleanup(patch.stopall) self.mock_os = patch.object(constants, 'os', autospec=True).start()