Fix broken unit tests

Commit 10ada71486db33c6cb69f35811d0ca3dc547eff0 broke the plugin
Commit 3aa89f4d818ab6705c56287b58a268e9fd5113c8 also broke the MH

Change-Id: Ib684536f6f61237ead8dbb46e40c722bb997d009
This commit is contained in:
Gary Kotton 2016-09-14 07:21:31 -07:00
parent 0d3106062e
commit eb8d2c313a
3 changed files with 7 additions and 1 deletions

View File

@ -1892,7 +1892,8 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
context, {'id': floatingip_db.id,
'port_id': floatingip_db.fixed_port_id,
'fixed_ip_address': floatingip_db.fixed_ip_address,
'tenant_id': floatingip_db.tenant_id})
'tenant_id': floatingip_db.tenant_id},
floatingip_db.tenant_id)
nsx_gw_port_id = routerlib.find_router_gw_port(
context, self.cluster, nsx_old_router_id)['uuid']
self._retrieve_and_delete_nat_rules(

View File

@ -48,6 +48,8 @@ class TestQosNsxV3Notification(base.BaseQosTestCase,
"qos")
self.qos_plugin = qos_plugin.QoSPlugin()
self.ctxt = context.Context('fake_user', 'fake_tenant')
mock.patch.object(self.ctxt.session, 'refresh').start()
mock.patch.object(self.ctxt.session, 'expunge').start()
self.policy_data = {
'policy': {'id': uuidutils.generate_uuid(),
'tenant_id': uuidutils.generate_uuid(),

View File

@ -63,6 +63,9 @@ class TestQosNsxVNotification(test_plugin.NsxVPluginV2TestCase,
# Pre defined QoS data for the tests
self.ctxt = context.Context('fake_user', 'fake_tenant')
mock.patch.object(self.ctxt.session, 'refresh').start()
mock.patch.object(self.ctxt.session, 'expunge').start()
self.policy_data = {
'policy': {'id': uuidutils.generate_uuid(),
'tenant_id': uuidutils.generate_uuid(),