NSX|V: Fix broken unittests
Commit Ia769dadf69781ba511a19c52998949b668963a19 changed a unittests which was originally overriden by the plugin unitests to use dhcp disabled subnet. This patch makes the same change in the local unit test Change-Id: I0794c2fe2bdb2ec1215cc11652f15da62f8daf9d
This commit is contained in:
parent
77de3838f9
commit
b024fb250d
@ -15,6 +15,7 @@
|
||||
|
||||
import contextlib
|
||||
import copy
|
||||
import itertools
|
||||
|
||||
from eventlet import greenthread
|
||||
import mock
|
||||
@ -1074,8 +1075,8 @@ class TestPortsV2(NsxVPluginV2TestCase,
|
||||
# simulate duplicate mac generation to make sure DBDuplicate is retried
|
||||
responses = ['12:34:56:78:00:00', '12:34:56:78:00:00',
|
||||
'12:34:56:78:00:01']
|
||||
with mock.patch.object(net, 'get_random_mac',
|
||||
side_effect=responses) as grand_mac:
|
||||
with mock.patch.object(net, 'random_mac_generator',
|
||||
return_value=itertools.cycle(responses)) as grand_mac:
|
||||
with self.subnet(enable_dhcp=False) as s:
|
||||
with self.port(subnet=s) as p1, self.port(subnet=s) as p2:
|
||||
self.assertEqual('12:34:56:78:00:00',
|
||||
|
Loading…
Reference in New Issue
Block a user