NetApp fix eseries unit test mock clean

This patch fixes the issue of mock not getting
cleaned for requests in unit tests.

Closes-Bug: #1353506

Change-Id: Iab401021d7f180ff1f2bf3ed79166699112cc367
(cherry picked from commit 1409565153)
This commit is contained in:
Navneet Singh 2014-08-28 16:03:41 +05:30 committed by Thierry Carrez
parent ad0ff5ec39
commit 8e94aaa2b2
1 changed files with 1 additions and 1 deletions

View File

@ -640,7 +640,7 @@ class NetAppEseriesIscsiDriverTestCase(test.TestCase):
def _custom_setup(self):
configuration = self._set_config(create_configuration())
self.driver = common.NetAppDriver(configuration=configuration)
requests.Session = mock.Mock(wraps=FakeEseriesHTTPSession)
self.mock_object(requests, 'Session', FakeEseriesHTTPSession)
self.driver.do_setup(context='context')
self.driver.check_for_setup_error()