diff --git a/designate_tempest_plugin/tests/api/admin/test_quotas.py b/designate_tempest_plugin/tests/api/admin/test_quotas.py
index 1221b9f..c25ad0a 100644
--- a/designate_tempest_plugin/tests/api/admin/test_quotas.py
+++ b/designate_tempest_plugin/tests/api/admin/test_quotas.py
@@ -36,12 +36,6 @@
 
     credentials = ["admin"]
 
-    def setUp(self):
-        super(QuotasAdminTest, self).setUp()
-        _, original_quotas = self.admin_client.show_quotas()
-        self.addCleanup(self.admin_client.update_quotas,
-                        **original_quotas['quota'])
-
     @classmethod
     def setup_credentials(cls):
         # Do not create network resources for these test.
diff --git a/designate_tempest_plugin/tests/api/v2/test_quotas.py b/designate_tempest_plugin/tests/api/v2/test_quotas.py
index 71a84e9..fe6c318 100644
--- a/designate_tempest_plugin/tests/api/v2/test_quotas.py
+++ b/designate_tempest_plugin/tests/api/v2/test_quotas.py
@@ -50,23 +50,10 @@
 
         cls.quotas_client = cls.os_primary.quotas_client
         cls.admin_client = cls.os_admin.quotas_client
-
-    def _store_quotas(self, project_id=None, cleanup=True):
-        """Remember current quotas and reset them after the test"""
-        params = {}
-        if project_id:
-            params['project_id'] = project_id
-            params['headers'] = {'X-Auth-All-Projects': True}
-
-        _r, original_quotas = self.admin_client.show_quotas(**params)
-        params.update(original_quotas)
-        if cleanup:
-            self.addCleanup(self.admin_client.update_quotas, **params)
-        return original_quotas
+        cls.alt_client = cls.os_alt.quotas_client
 
     @decorators.idempotent_id('1dac991a-9e2e-452c-a47a-26ac37381ec5')
     def test_show_quotas(self):
-        self._store_quotas()
         LOG.info("Updating quotas")
         quotas = dns_data_utils.rand_quotas()
         _, body = self.admin_client.update_quotas(**quotas)
@@ -80,7 +67,6 @@
 
     @decorators.idempotent_id('0448b089-5803-4ce3-8a6c-5c15ff75a2cc')
     def test_delete_quotas(self):
-        self._store_quotas()
         LOG.info("Deleting quotas")
         _, body = self.admin_client.delete_quotas()
 
@@ -89,10 +75,10 @@
 
     @decorators.idempotent_id('76d24c87-1b39-4e19-947c-c08e1380dc61')
     def test_update_quotas(self):
-        self._store_quotas()
         LOG.info("Updating quotas")
         quotas = dns_data_utils.rand_quotas()
         _, body = self.admin_client.update_quotas(**quotas)
+        self.addCleanup(self.admin_client.delete_quotas)
 
         LOG.info("Ensuring the response has all quota types")
         self.assertExpected(quotas, body, [])
@@ -101,7 +87,6 @@
     def test_update_quotas_other_project(self):
 
         project_id = self.quotas_client.tenant_id
-        self._store_quotas(project_id=project_id)
 
         LOG.info("Updating quotas for %s ", project_id)
 
@@ -110,6 +95,7 @@
         request['project_id'] = project_id
         request['headers'] = {'X-Auth-All-Projects': True}
         _, body = self.admin_client.update_quotas(**request)
+        self.addCleanup(self.admin_client.delete_quotas, project_id=project_id)
 
         LOG.info("Ensuring the response has all quota types")
         self.assertExpected(quotas, body, [])
@@ -123,13 +109,8 @@
 
         LOG.info("Using 'alt' project id to set quotas on.")
         project_id = self.alt_client.tenant_id
-        self._store_quotas(project_id=project_id)
 
-        LOG.info("Resetting quotas to default for %s ", project_id)
-        self.admin_client.delete_quotas(
-            project_id=project_id,
-            headers={'X-Auth-All-Projects': True})
-        _, default_quotas = self.admin_client.show_quotas(
+        _, original_quotas = self.admin_client.show_quotas(
             project_id=project_id, headers={'X-Auth-All-Projects': True})
 
         LOG.info("Updating quotas for %s ", project_id)
@@ -139,6 +120,7 @@
         request['project_id'] = project_id
         request['headers'] = {'X-Auth-All-Projects': True}
         _, body = self.admin_client.update_quotas(**request)
+        self.addCleanup(self.admin_client.delete_quotas, project_id=project_id)
 
         self.admin_client.delete_quotas(
             project_id=project_id,
@@ -147,7 +129,7 @@
         _, final_quotas = self.admin_client.show_quotas(
             project_id=project_id, headers={'X-Auth-All-Projects': True})
 
-        self.assertExpected(default_quotas, final_quotas, [])
+        self.assertExpected(original_quotas, final_quotas, [])
 
     @decorators.idempotent_id('9b09b3e2-7e88-4569-bce3-9be2f7ac70c4')
     def test_update_quotas_invalid_project(self):
@@ -157,17 +139,19 @@
                                      "is not being verified.")
 
         project_id = 'project-that-does-not-exist'
-        original_quotas = self._store_quotas(project_id=project_id,
-                                             cleanup=False)
 
         LOG.info("Updating quotas for non-existing %s ", project_id)
 
+        _, original_quotas = self.admin_client.show_quotas(
+            project_id=project_id, headers={'X-Auth-All-Projects': True})
+
         quotas = dns_data_utils.rand_quotas()
         request = quotas.copy()
         request['project_id'] = project_id
         request['headers'] = {'X-Auth-All-Projects': True}
         with self.assertRaisesDns(lib_exc.BadRequest, 'invalid_project', 400):
             self.admin_client.update_quotas(**request)
+        self.addCleanup(self.admin_client.delete_quotas, project_id=project_id)
 
         _, client_body = self.quotas_client.show_quotas()
 
