]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Delete a broken subnet delete unit test
authorKevin Benton <blak111@gmail.com>
Thu, 18 Sep 2014 20:46:51 +0000 (13:46 -0700)
committerKevin Benton <blak111@gmail.com>
Wed, 17 Sep 2014 19:53:53 +0000 (12:53 -0700)
A test to delete a subnet in use was incorrectly
calling 'subnet' instead of 'subnets' in the API request
and asserting a 404 instead of a 409. Even the correct
version of this test is already covered by the
'test_port_prevents_subnet_deletion' method so this
commit just removes the broken test.

Change-Id: I3eac35abbb1d6f8429b4331948aecfc952284219

neutron/tests/unit/test_db_plugin.py

index 0948cecb30560820623fdb084a9579c566236281..7754cc2b12d6a4a03f75d80a4b44df0c791f5202 100644 (file)
@@ -1306,18 +1306,6 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s
                 res = self._create_port(self.fmt, net_id=net_id, **kwargs)
                 self.assertEqual(res.status_int, webob.exc.HTTPConflict.code)
 
-    def test_requested_subnet_delete(self):
-        with self.subnet() as subnet:
-            with self.port(subnet=subnet) as port:
-                ips = port['port']['fixed_ips']
-                self.assertEqual(len(ips), 1)
-                self.assertEqual(ips[0]['ip_address'], '10.0.0.2')
-                self.assertEqual(ips[0]['subnet_id'], subnet['subnet']['id'])
-                req = self.new_delete_request('subnet',
-                                              subnet['subnet']['id'])
-                res = req.get_response(self.api)
-                self.assertEqual(res.status_int, webob.exc.HTTPNotFound.code)
-
     def test_requested_subnet_id(self):
         with self.subnet() as subnet:
             with self.port(subnet=subnet) as port: