diff --git a/neutron/tests/tempest/api/base.py b/neutron/tests/tempest/api/base.py
index afcbe9c..3fc61cb 100644
--- a/neutron/tests/tempest/api/base.py
+++ b/neutron/tests/tempest/api/base.py
@@ -118,14 +118,6 @@
     @classmethod
     def resource_cleanup(cls):
         if CONF.service_available.neutron:
-            # Clean up QoS rules
-            for qos_rule in cls.qos_rules:
-                cls._try_delete_resource(cls.admin_client.delete_qos_rule,
-                                         qos_rule['id'])
-            # Clean up QoS policies
-            for qos_policy in cls.qos_policies:
-                cls._try_delete_resource(cls.admin_client.delete_qos_policy,
-                                         qos_policy['id'])
             # Clean up floating IPs
             for floating_ip in cls.floating_ips:
                 cls._try_delete_resource(cls.client.delete_floatingip,
@@ -194,6 +186,17 @@
                     cls.admin_client.delete_address_scope,
                     address_scope['id'])
 
+            # Clean up QoS rules
+            for qos_rule in cls.qos_rules:
+                cls._try_delete_resource(cls.admin_client.delete_qos_rule,
+                                         qos_rule['id'])
+            # Clean up QoS policies
+            # as all networks and ports are already removed, QoS policies
+            # shouldn't be "in use"
+            for qos_policy in cls.qos_policies:
+                cls._try_delete_resource(cls.admin_client.delete_qos_policy,
+                                         qos_policy['id'])
+
         super(BaseNetworkTest, cls).resource_cleanup()
 
     @classmethod
diff --git a/neutron/tests/tempest/api/test_qos.py b/neutron/tests/tempest/api/test_qos.py
index 6a44abb..39b74ff 100644
--- a/neutron/tests/tempest/api/test_qos.py
+++ b/neutron/tests/tempest/api/test_qos.py
@@ -214,11 +214,6 @@
             sorted(tuple(expected_rule_type_details_keys)),
             sorted(tuple(rule_type_details.keys())))
 
-    def _disassociate_network(self, client, network_id):
-        updated_network = client.update_network(network_id,
-                                                qos_policy_id=None)
-        self.assertIsNone(updated_network['network']['qos_policy_id'])
-
     @decorators.idempotent_id('65b9ef75-1911-406a-bbdb-ca1d68d528b0')
     def test_policy_association_with_admin_network(self):
         policy = self.create_qos_policy(name='test-policy',
@@ -231,8 +226,6 @@
         self.assertEqual(
             policy['id'], retrieved_network['network']['qos_policy_id'])
 
-        self._disassociate_network(self.admin_client, network['id'])
-
     @decorators.idempotent_id('1738de5d-0476-4163-9022-5e1b548c208e')
     def test_policy_association_with_tenant_network(self):
         policy = self.create_qos_policy(name='test-policy',
@@ -245,8 +238,6 @@
         self.assertEqual(
             policy['id'], retrieved_network['network']['qos_policy_id'])
 
-        self._disassociate_network(self.client, network['id'])
-
     @decorators.idempotent_id('9efe63d0-836f-4cc2-b00c-468e63aa614e')
     def test_policy_association_with_network_nonexistent_policy(self):
         self.assertRaises(
@@ -280,13 +271,6 @@
         self.assertEqual(
             policy['id'], retrieved_network['network']['qos_policy_id'])
 
-        self._disassociate_network(self.admin_client, network['id'])
-
-    def _disassociate_port(self, port_id):
-        self.client.update_port(port_id, qos_policy_id=None)
-        updated_port = self.admin_client.show_port(port_id)
-        self.assertIsNone(updated_port['port']['qos_policy_id'])
-
     @decorators.idempotent_id('98fcd95e-84cf-4746-860e-44692e674f2e')
     def test_policy_association_with_port_shared_policy(self):
         policy = self.create_qos_policy(name='test-policy',
@@ -299,8 +283,6 @@
         self.assertEqual(
             policy['id'], retrieved_port['port']['qos_policy_id'])
 
-        self._disassociate_port(port['id'])
-
     @decorators.idempotent_id('49e02f5a-e1dd-41d5-9855-cfa37f2d195e')
     def test_policy_association_with_port_nonexistent_policy(self):
         network = self.create_shared_network('test network')
@@ -336,36 +318,27 @@
         self.assertEqual(
             policy['id'], retrieved_port['port']['qos_policy_id'])
 
-        self._disassociate_port(port['id'])
-
     @decorators.idempotent_id('18163237-8ba9-4db5-9525-bad6d2343c75')
     def test_delete_not_allowed_if_policy_in_use_by_network(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
                                         shared=True)
-        network = self.create_shared_network(
-            'test network', qos_policy_id=policy['id'])
+        self.create_shared_network('test network', qos_policy_id=policy['id'])
         self.assertRaises(
             exceptions.Conflict,
             self.admin_client.delete_qos_policy, policy['id'])
 
-        self._disassociate_network(self.admin_client, network['id'])
-        self.admin_client.delete_qos_policy(policy['id'])
-
     @decorators.idempotent_id('24153230-84a9-4dd5-9525-bad6d2343c75')
     def test_delete_not_allowed_if_policy_in_use_by_port(self):
         policy = self.create_qos_policy(name='test-policy',
                                         description='test policy',
                                         shared=True)
         network = self.create_shared_network('test network')
-        port = self.create_port(network, qos_policy_id=policy['id'])
+        self.create_port(network, qos_policy_id=policy['id'])
         self.assertRaises(
             exceptions.Conflict,
             self.admin_client.delete_qos_policy, policy['id'])
 
-        self._disassociate_port(port['id'])
-        self.admin_client.delete_qos_policy(policy['id'])
-
     @decorators.idempotent_id('a2a5849b-dd06-4b18-9664-0b6828a1fc27')
     def test_qos_policy_delete_with_rules(self):
         policy = self.create_qos_policy(name='test-policy',
@@ -404,8 +377,6 @@
                                         is_default=True)
         network = self.create_network('test network', client=self.admin_client,
                                       project_id=project_id)
-        self.addCleanup(self._disassociate_network,
-                        self.admin_client, network['id'])
         retrieved_network = self.admin_client.show_network(network['id'])
         self.assertEqual(
             policy['id'], retrieved_network['network']['qos_policy_id'])
@@ -421,8 +392,6 @@
         network = self.create_network('test network', client=self.admin_client,
                                       project_id=project_id,
                                       qos_policy_id=policy['id'])
-        self.addCleanup(self._disassociate_network,
-                        self.admin_client, network['id'])
         retrieved_network = self.admin_client.show_network(network['id'])
         self.assertEqual(
             policy['id'], retrieved_network['network']['qos_policy_id'])
