283
283
self.assertEqual(show_port_res.status_int, 430)
284
284
LOG.debug("_test_show_port_portnotfound - format:%s - END", format)
286
def _test_create_port_noreqbody(self, format):
287
LOG.debug("_test_create_port_noreqbody - format:%s - START", format)
288
content_type = "application/%s" % format
289
network_id = self._create_network(format)
290
port_id = self._create_port(network_id, None, format,
292
show_port_req = testlib.show_port_request(self.tenant_id,
293
network_id, port_id, format)
294
show_port_res = show_port_req.get_response(self.api)
295
self.assertEqual(show_port_res.status_int, 200)
296
port_data = self._port_serializer.deserialize(
297
show_port_res.body, content_type)
298
self.assertEqual(port_id, port_data['port']['id'])
299
LOG.debug("_test_create_port_noreqbody - format:%s - END", format)
286
301
def _test_create_port(self, format):
287
302
LOG.debug("_test_create_port - format:%s - START", format)
288
303
content_type = "application/%s" % format
739
754
def test_create_port_xml(self):
740
755
self._test_create_port('xml')
757
def test_create_port_noreqbody_json(self):
758
self._test_create_port_noreqbody('json')
760
def test_create_port_noreqbody_xml(self):
761
self._test_create_port_noreqbody('xml')
742
763
def test_create_port_networknotfound_json(self):
743
764
self._test_create_port_networknotfound('json')