~salvatore-orlando/neutron/improve-pylint

« back to all changes in this revision

Viewing changes to tests/unit/test_api.py

  • Committer: Salvatore Orlando
  • Date: 2011-08-03 14:45:48 UTC
  • mfrom: (30.1.1 quantum-bug814518)
  • Revision ID: salvatore.orlando@eu.citrix.com-20110803144548-dcqlw8x9l39t5n25
Applying fix for bug #814518
Merging from lp:~salvatore-orlando/quantum/bug814518

Show diffs side-by-side

added added

removed removed

Lines of Context:
283
283
        self.assertEqual(show_port_res.status_int, 430)
284
284
        LOG.debug("_test_show_port_portnotfound - format:%s - END", format)
285
285
 
 
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,
 
291
                                    custom_req_body='')
 
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)
 
300
 
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')
741
756
 
 
757
    def test_create_port_noreqbody_json(self):
 
758
        self._test_create_port_noreqbody('json')
 
759
 
 
760
    def test_create_port_noreqbody_xml(self):
 
761
        self._test_create_port_noreqbody('xml')
 
762
 
742
763
    def test_create_port_networknotfound_json(self):
743
764
        self._test_create_port_networknotfound('json')
744
765