NSX|V3: fix test imports

Change-Id: I631707d9f891e7aa6f59a4896bf48c8e063d141c
This commit is contained in:
Gary Kotton
2016-04-11 22:17:55 -07:00
parent 45f809514e
commit eeb875d11e

View File

@@ -14,7 +14,7 @@
# limitations under the License. # limitations under the License.
import mock import mock
import six import six
import webob.exc from webob import exc
from neutron.api.v2 import attributes from neutron.api.v2 import attributes
from neutron import context from neutron import context
@@ -52,7 +52,6 @@ from vmware_nsx.tests import unit as vmware
from vmware_nsx.tests.unit.extensions import test_metadata from vmware_nsx.tests.unit.extensions import test_metadata
from vmware_nsx.tests.unit.nsx_v3 import mocks as nsx_v3_mocks from vmware_nsx.tests.unit.nsx_v3 import mocks as nsx_v3_mocks
from vmware_nsx.tests.unit.nsxlib.v3 import nsxlib_testcase from vmware_nsx.tests.unit.nsxlib.v3 import nsxlib_testcase
from webob import exc
PLUGIN_NAME = 'vmware_nsx.plugin.NsxV3Plugin' PLUGIN_NAME = 'vmware_nsx.plugin.NsxV3Plugin'
@@ -227,7 +226,7 @@ class TestPortsV2(test_plugin.TestPortsV2, NsxV3PluginTestCaseMixin,
device_owner = constants.DEVICE_OWNER_COMPUTE_PREFIX + 'X' device_owner = constants.DEVICE_OWNER_COMPUTE_PREFIX + 'X'
res = self._create_port(self.fmt, res = self._create_port(self.fmt,
network['network']['id'], network['network']['id'],
webob.exc.HTTPBadRequest.code, exc.HTTPBadRequest.code,
device_owner=device_owner) device_owner=device_owner)
data = self.deserialize(self.fmt, res) data = self.deserialize(self.fmt, res)
self.assertEqual(expected_error, data['NeutronError']['type']) self.assertEqual(expected_error, data['NeutronError']['type'])
@@ -241,7 +240,7 @@ class TestPortsV2(test_plugin.TestPortsV2, NsxV3PluginTestCaseMixin,
req = self.new_update_request('ports', req = self.new_update_request('ports',
data, port['port']['id']) data, port['port']['id'])
res = req.get_response(self.api) res = req.get_response(self.api)
self.assertEqual(webob.exc.HTTPBadRequest.code, self.assertEqual(exc.HTTPBadRequest.code,
res.status_int) res.status_int)