Merge "ML2 UT: Fix incorrect mock return value"
This commit is contained in:
commit
481d366298
@ -465,9 +465,9 @@ class TestCiscoPortsV2(CiscoML2MechanismTestCase,
|
|||||||
# The code we are exercising calls connect() twice, if there is a
|
# The code we are exercising calls connect() twice, if there is a
|
||||||
# TypeError on the first call (if the old ncclient is installed).
|
# TypeError on the first call (if the old ncclient is installed).
|
||||||
# The second call should succeed. That's what we are simulating here.
|
# The second call should succeed. That's what we are simulating here.
|
||||||
connect = self.mock_ncclient.connect
|
orig_connect_return_val = self.mock_ncclient.connect.return_value
|
||||||
with self._patch_ncclient('connect.side_effect',
|
with self._patch_ncclient('connect.side_effect',
|
||||||
[TypeError, connect]):
|
[TypeError, orig_connect_return_val]):
|
||||||
with self._create_resources() as result:
|
with self._create_resources() as result:
|
||||||
self.assertEqual(result.status_int,
|
self.assertEqual(result.status_int,
|
||||||
wexc.HTTPOk.code)
|
wexc.HTTPOk.code)
|
||||||
|
Loading…
Reference in New Issue
Block a user