diff --git a/tempest/tests/compute/admin/test_flavors.py b/tempest/tests/compute/admin/test_flavors.py
index 32b06f8..7957009 100644
--- a/tempest/tests/compute/admin/test_flavors.py
+++ b/tempest/tests/compute/admin/test_flavors.py
@@ -48,6 +48,11 @@
         cls.swap = 1024
         cls.rxtx = 2
 
+    def flavor_clean_up(self, flavor_id):
+        resp, body = self.client.delete_flavor(flavor_id)
+        self.assertEqual(resp.status, 202)
+        self.client.wait_for_resource_deletion(flavor_id)
+
     @attr(type='positive')
     def test_create_flavor(self):
         # Create a flavor and ensure it is listed
@@ -55,43 +60,37 @@
         flavor_name = rand_name(self.flavor_name_prefix)
         new_flavor_id = rand_int_id(start=1000)
 
-        try:
-            #Create the flavor
-            resp, flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     ephemeral=self.ephemeral,
-                                                     swap=self.swap,
-                                                     rxtx=self.rxtx)
-            self.assertEqual(200, resp.status)
-            self.assertEqual(flavor['name'], flavor_name)
-            self.assertEqual(flavor['vcpus'], self.vcpus)
-            self.assertEqual(flavor['disk'], self.disk)
-            self.assertEqual(flavor['ram'], self.ram)
-            self.assertEqual(int(flavor['id']), new_flavor_id)
-            self.assertEqual(flavor['swap'], self.swap)
-            self.assertEqual(flavor['rxtx_factor'], self.rxtx)
-            self.assertEqual(flavor['OS-FLV-EXT-DATA:ephemeral'],
-                             self.ephemeral)
-            if self._interface == "xml":
-                XMLNS_OS_FLV_ACCESS = "http://docs.openstack.org/compute/ext/"\
-                    "flavor_access/api/v2"
-                key = "{" + XMLNS_OS_FLV_ACCESS + "}is_public"
-                self.assertEqual(flavor[key], "True")
-            if self._interface == "json":
-                self.assertEqual(flavor['os-flavor-access:is_public'], True)
+        #Create the flavor
+        resp, flavor = self.client.create_flavor(flavor_name,
+                                                 self.ram, self.vcpus,
+                                                 self.disk,
+                                                 new_flavor_id,
+                                                 ephemeral=self.ephemeral,
+                                                 swap=self.swap,
+                                                 rxtx=self.rxtx)
+        self.addCleanup(self.flavor_clean_up, flavor['id'])
+        self.assertEqual(200, resp.status)
+        self.assertEqual(flavor['name'], flavor_name)
+        self.assertEqual(flavor['vcpus'], self.vcpus)
+        self.assertEqual(flavor['disk'], self.disk)
+        self.assertEqual(flavor['ram'], self.ram)
+        self.assertEqual(int(flavor['id']), new_flavor_id)
+        self.assertEqual(flavor['swap'], self.swap)
+        self.assertEqual(flavor['rxtx_factor'], self.rxtx)
+        self.assertEqual(flavor['OS-FLV-EXT-DATA:ephemeral'],
+                         self.ephemeral)
+        if self._interface == "xml":
+            XMLNS_OS_FLV_ACCESS = "http://docs.openstack.org/compute/ext/"\
+                "flavor_access/api/v2"
+            key = "{" + XMLNS_OS_FLV_ACCESS + "}is_public"
+            self.assertEqual(flavor[key], "True")
+        if self._interface == "json":
+            self.assertEqual(flavor['os-flavor-access:is_public'], True)
 
-            #Verify flavor is retrieved
-            resp, flavor = self.client.get_flavor_details(new_flavor_id)
-            self.assertEqual(resp.status, 200)
-            self.assertEqual(flavor['name'], flavor_name)
-
-        finally:
-            #Delete the flavor
-            resp, body = self.client.delete_flavor(new_flavor_id)
-            self.assertEqual(resp.status, 202)
-            self.client.wait_for_resource_deletion(new_flavor_id)
+        #Verify flavor is retrieved
+        resp, flavor = self.client.get_flavor_details(new_flavor_id)
+        self.assertEqual(resp.status, 200)
+        self.assertEqual(flavor['name'], flavor_name)
 
     @attr(type='positive')
     def test_create_flavor_verify_entry_in_list_details(self):
@@ -100,29 +99,23 @@
         flavor_name = rand_name(self.flavor_name_prefix)
         new_flavor_id = rand_int_id(start=1000)
 
-        try:
-            #Create the flavor
-            resp, flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     ephemeral=self.ephemeral,
-                                                     swap=self.swap,
-                                                     rxtx=self.rxtx)
-            flag = False
-            #Verify flavor is retrieved
-            resp, flavors = self.client.list_flavors_with_detail()
-            self.assertEqual(resp.status, 200)
-            for flavor in flavors:
-                if flavor['name'] == flavor_name:
-                    flag = True
-            self.assertTrue(flag)
-
-        finally:
-            #Delete the flavor
-            resp, body = self.client.delete_flavor(new_flavor_id)
-            self.assertEqual(resp.status, 202)
-            self.client.wait_for_resource_deletion(new_flavor_id)
+        #Create the flavor
+        resp, flavor = self.client.create_flavor(flavor_name,
+                                                 self.ram, self.vcpus,
+                                                 self.disk,
+                                                 new_flavor_id,
+                                                 ephemeral=self.ephemeral,
+                                                 swap=self.swap,
+                                                 rxtx=self.rxtx)
+        self.addCleanup(self.flavor_clean_up, flavor['id'])
+        flag = False
+        #Verify flavor is retrieved
+        resp, flavors = self.client.list_flavors_with_detail()
+        self.assertEqual(resp.status, 200)
+        for flavor in flavors:
+            if flavor['name'] == flavor_name:
+                flag = True
+        self.assertTrue(flag)
 
     @attr(type='negative')
     def test_get_flavor_details_for_deleted_flavor(self):
@@ -138,11 +131,11 @@
                                                  ephemeral=self.ephemeral,
                                                  swap=self.swap,
                                                  rxtx=self.rxtx)
-        self.assertEquals(200, resp.status)
-
         # Delete the flavor
-        resp, _ = self.client.delete_flavor(new_flavor_id)
-        self.assertEqual(resp.status, 202)
+        new_flavor_id = flavor['id']
+        resp_delete, body = self.client.delete_flavor(new_flavor_id)
+        self.assertEquals(200, resp.status)
+        self.assertEquals(202, resp_delete.status)
 
         # Deleted flavors can be seen via detailed GET
         resp, flavor = self.client.get_flavor_details(new_flavor_id)
@@ -164,46 +157,40 @@
         flavor_name = rand_name(self.flavor_name_prefix)
         new_flavor_id = rand_int_id(start=1000)
 
-        try:
-            #Create the flavor
-            resp, flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id)
-            self.assertEqual(200, resp.status)
-            self.assertEqual(flavor['name'], flavor_name)
-            self.assertEqual(flavor['ram'], self.ram)
-            self.assertEqual(flavor['vcpus'], self.vcpus)
-            self.assertEqual(flavor['disk'], self.disk)
-            self.assertEqual(int(flavor['id']), new_flavor_id)
-            self.assertEqual(flavor['swap'], '')
-            self.assertEqual(int(flavor['rxtx_factor']), 1)
-            self.assertEqual(int(flavor['OS-FLV-EXT-DATA:ephemeral']), 0)
-            if self._interface == "xml":
-                XMLNS_OS_FLV_ACCESS = "http://docs.openstack.org/compute/ext/"\
-                    "flavor_access/api/v2"
-                key = "{" + XMLNS_OS_FLV_ACCESS + "}is_public"
-                self.assertEqual(flavor[key], "True")
-            if self._interface == "json":
-                self.assertEqual(flavor['os-flavor-access:is_public'], True)
+        #Create the flavor
+        resp, flavor = self.client.create_flavor(flavor_name,
+                                                 self.ram, self.vcpus,
+                                                 self.disk,
+                                                 new_flavor_id)
+        self.addCleanup(self.flavor_clean_up, flavor['id'])
+        self.assertEqual(200, resp.status)
+        self.assertEqual(flavor['name'], flavor_name)
+        self.assertEqual(flavor['ram'], self.ram)
+        self.assertEqual(flavor['vcpus'], self.vcpus)
+        self.assertEqual(flavor['disk'], self.disk)
+        self.assertEqual(int(flavor['id']), new_flavor_id)
+        self.assertEqual(flavor['swap'], '')
+        self.assertEqual(int(flavor['rxtx_factor']), 1)
+        self.assertEqual(int(flavor['OS-FLV-EXT-DATA:ephemeral']), 0)
+        if self._interface == "xml":
+            XMLNS_OS_FLV_ACCESS = "http://docs.openstack.org/compute/ext/"\
+                "flavor_access/api/v2"
+            key = "{" + XMLNS_OS_FLV_ACCESS + "}is_public"
+            self.assertEqual(flavor[key], "True")
+        if self._interface == "json":
+            self.assertEqual(flavor['os-flavor-access:is_public'], True)
 
-            #Verify flavor is retrieved
-            resp, flavor = self.client.get_flavor_details(new_flavor_id)
-            self.assertEqual(resp.status, 200)
-            self.assertEqual(flavor['name'], flavor_name)
-            #Check if flavor is present in list
-            resp, flavors = self.client.list_flavors_with_detail()
-            self.assertEqual(resp.status, 200)
-            for flavor in flavors:
-                if flavor['name'] == flavor_name:
-                    flag = True
-            self.assertTrue(flag)
-
-        finally:
-            #Delete the flavor
-            resp, body = self.client.delete_flavor(new_flavor_id)
-            self.assertEqual(resp.status, 202)
-            self.client.wait_for_resource_deletion(new_flavor_id)
+        #Verify flavor is retrieved
+        resp, flavor = self.client.get_flavor_details(new_flavor_id)
+        self.assertEqual(resp.status, 200)
+        self.assertEqual(flavor['name'], flavor_name)
+        #Check if flavor is present in list
+        resp, flavors = self.client.list_flavors_with_detail()
+        self.assertEqual(resp.status, 200)
+        for flavor in flavors:
+            if flavor['name'] == flavor_name:
+                flag = True
+        self.assertTrue(flag)
 
     @attr(type='positive')
     def test_flavor_not_public_verify_entry_not_in_list_details(self):
@@ -213,25 +200,21 @@
         flavor_name = rand_name(self.flavor_name_prefix)
         new_flavor_id = rand_int_id(start=1000)
 
-        try:
-            #Create the flavor
-            resp, flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     is_public="False")
-            flag = False
-            #Verify flavor is retrieved
-            resp, flavors = self.client.list_flavors_with_detail()
-            self.assertEqual(resp.status, 200)
-            for flavor in flavors:
-                if flavor['name'] == flavor_name:
-                    flag = True
-            self.assertFalse(flag)
-        finally:
-            #Delete the flavor
-            resp, body = self.client.delete_flavor(new_flavor_id)
-            self.assertEqual(resp.status, 202)
+        #Create the flavor
+        resp, flavor = self.client.create_flavor(flavor_name,
+                                                 self.ram, self.vcpus,
+                                                 self.disk,
+                                                 new_flavor_id,
+                                                 is_public="False")
+        self.addCleanup(self.flavor_clean_up, flavor['id'])
+        flag = False
+        #Verify flavor is retrieved
+        resp, flavors = self.client.list_flavors_with_detail()
+        self.assertEqual(resp.status, 200)
+        for flavor in flavors:
+            if flavor['name'] == flavor_name:
+                flag = True
+        self.assertFalse(flag)
 
     def test_list_public_flavor_with_other_user(self):
         #Create a Flavor with public access.
@@ -239,76 +222,65 @@
         flavor_name = rand_name(self.flavor_name_prefix)
         new_flavor_id = rand_int_id(start=1000)
 
-        try:
             #Create the flavor
-            resp, flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     is_public="True")
-            flag = False
-            self.new_client = self.flavors_client
-            #Verify flavor is retrieved with new user
-            resp, flavors = self.new_client.list_flavors_with_detail()
-            self.assertEqual(resp.status, 200)
-            for flavor in flavors:
-                if flavor['name'] == flavor_name:
-                    flag = True
-            self.assertTrue(flag)
-        finally:
-            #Delete the flavor
-            resp, body = self.client.delete_flavor(new_flavor_id)
-            self.assertEqual(resp.status, 202)
-            self.client.wait_for_resource_deletion(new_flavor_id)
+        resp, flavor = self.client.create_flavor(flavor_name,
+                                                 self.ram, self.vcpus,
+                                                 self.disk,
+                                                 new_flavor_id,
+                                                 is_public="True")
+        self.addCleanup(self.flavor_clean_up, flavor['id'])
+        flag = False
+        self.new_client = self.flavors_client
+        #Verify flavor is retrieved with new user
+        resp, flavors = self.new_client.list_flavors_with_detail()
+        self.assertEqual(resp.status, 200)
+        for flavor in flavors:
+            if flavor['name'] == flavor_name:
+                flag = True
+        self.assertTrue(flag)
 
     @attr(type='positive')
     def test_is_public_string_variations(self):
-        try:
-            flavor_id_not_public = rand_int_id(start=1000)
-            flavor_name_not_public = rand_name(self.flavor_name_prefix)
-            flavor_id_public = rand_int_id(start=1000)
-            flavor_name_public = rand_name(self.flavor_name_prefix)
+        flavor_id_not_public = rand_int_id(start=1000)
+        flavor_name_not_public = rand_name(self.flavor_name_prefix)
+        flavor_id_public = rand_int_id(start=1000)
+        flavor_name_public = rand_name(self.flavor_name_prefix)
 
-            # Create a non public flavor
-            resp, flavor = self.client.create_flavor(flavor_name_not_public,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     flavor_id_not_public,
-                                                     is_public="False")
+        # Create a non public flavor
+        resp, flavor = self.client.create_flavor(flavor_name_not_public,
+                                                 self.ram, self.vcpus,
+                                                 self.disk,
+                                                 flavor_id_not_public,
+                                                 is_public="False")
+        self.addCleanup(self.flavor_clean_up, flavor['id'])
 
-            # Create a public flavor
-            resp, flavor = self.client.create_flavor(flavor_name_public,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     flavor_id_public,
-                                                     is_public="True")
+        # Create a public flavor
+        resp, flavor = self.client.create_flavor(flavor_name_public,
+                                                 self.ram, self.vcpus,
+                                                 self.disk,
+                                                 flavor_id_public,
+                                                 is_public="True")
+        self.addCleanup(self.flavor_clean_up, flavor['id'])
 
-            def _flavor_lookup(flavors, flavor_name):
-                for flavor in flavors:
-                    if flavor['name'] == flavor_name:
-                        return flavor
-                return None
+        def _flavor_lookup(flavors, flavor_name):
+            for flavor in flavors:
+                if flavor['name'] == flavor_name:
+                    return flavor
+            return None
 
-            def _test_string_variations(variations, flavor_name):
-                for string in variations:
-                    params = {'is_public': string}
-                    r, flavors = self.client.list_flavors_with_detail(params)
-                    self.assertEqual(r.status, 200)
-                    flavor = _flavor_lookup(flavors, flavor_name)
-                    self.assertNotEqual(flavor, None)
+        def _test_string_variations(variations, flavor_name):
+            for string in variations:
+                params = {'is_public': string}
+                r, flavors = self.client.list_flavors_with_detail(params)
+                self.assertEqual(r.status, 200)
+                flavor = _flavor_lookup(flavors, flavor_name)
+                self.assertNotEqual(flavor, None)
 
-            _test_string_variations(['f', 'false', 'no', '0'],
-                                    flavor_name_not_public)
+        _test_string_variations(['f', 'false', 'no', '0'],
+                                flavor_name_not_public)
 
-            _test_string_variations(['t', 'true', 'yes', '1'],
-                                    flavor_name_public)
-
-        finally:
-            # Delete flavors
-            for flavor_id in [flavor_id_not_public, flavor_id_public]:
-                resp, body = self.client.delete_flavor(flavor_id)
-                self.assertEqual(resp.status, 202)
-                self.client.wait_for_resource_deletion(flavor_id)
+        _test_string_variations(['t', 'true', 'yes', '1'],
+                                flavor_name_public)
 
     @attr(type='negative')
     def test_invalid_is_public_string(self):
diff --git a/tempest/tests/compute/security_groups/test_security_group_rules.py b/tempest/tests/compute/security_groups/test_security_group_rules.py
index 99d9a5d..c2032d4 100644
--- a/tempest/tests/compute/security_groups/test_security_group_rules.py
+++ b/tempest/tests/compute/security_groups/test_security_group_rules.py
@@ -33,30 +33,24 @@
     def test_security_group_rules_create(self):
         # Positive test: Creation of Security Group rule
         # should be successfull
-        try:
-            #Creating a Security Group to add rules to it
-            s_name = rand_name('securitygroup-')
-            s_description = rand_name('description-')
-            resp, securitygroup = \
-                self.client.create_security_group(s_name, s_description)
-            securitygroup_id = securitygroup['id']
-            #Adding rules to the created Security Group
-            parent_group_id = securitygroup['id']
-            ip_protocol = 'tcp'
-            from_port = 22
-            to_port = 22
-            resp, rule = \
-                self.client.create_security_group_rule(parent_group_id,
-                                                       ip_protocol,
-                                                       from_port,
-                                                       to_port)
-            self.assertEqual(200, resp.status)
-        finally:
-            #Deleting the Security Group rule, created in this method
-            group_rule_id = rule['id']
-            self.client.delete_security_group_rule(group_rule_id)
-            #Deleting the Security Group created in this method
-            resp, _ = self.client.delete_security_group(securitygroup_id)
+        #Creating a Security Group to add rules to it
+        s_name = rand_name('securitygroup-')
+        s_description = rand_name('description-')
+        resp, securitygroup = \
+            self.client.create_security_group(s_name, s_description)
+        securitygroup_id = securitygroup['id']
+        self.addCleanup(self.client.delete_security_group, securitygroup_id)
+        #Adding rules to the created Security Group
+        ip_protocol = 'tcp'
+        from_port = 22
+        to_port = 22
+        resp, rule = \
+            self.client.create_security_group_rule(securitygroup_id,
+                                                   ip_protocol,
+                                                   from_port,
+                                                   to_port)
+        self.addCleanup(self.client.delete_security_group_rule, rule['id'])
+        self.assertEqual(200, resp.status)
 
     @attr(type='positive')
     def test_security_group_rules_create_with_optional_arguments(self):
@@ -64,75 +58,38 @@
         # with optional arguments
         # should be successfull
 
-        rule_id = None
         secgroup1 = None
         secgroup2 = None
-        try:
-            #Creating a Security Group to add rules to it
-            s_name = rand_name('securitygroup-')
-            s_description = rand_name('description-')
-            resp, securitygroup = \
-                self.client.create_security_group(s_name, s_description)
-            secgroup1 = securitygroup['id']
-            #Creating a Security Group so as to assign group_id to the rule
-            s_name2 = rand_name('securitygroup-')
-            s_description2 = rand_name('description-')
-            resp, securitygroup = \
-                self.client.create_security_group(s_name2, s_description2)
-            secgroup2 = securitygroup['id']
-            #Adding rules to the created Security Group with optional arguments
-            parent_group_id = secgroup1
-            ip_protocol = 'tcp'
-            from_port = 22
-            to_port = 22
-            cidr = '10.2.3.124/24'
-            group_id = secgroup2
-            resp, rule = \
-                self.client.create_security_group_rule(parent_group_id,
-                                                       ip_protocol,
-                                                       from_port,
-                                                       to_port,
-                                                       cidr=cidr,
-                                                       group_id=group_id)
-            rule_id = rule['id']
-            self.assertEqual(200, resp.status)
-        finally:
-            #Deleting the Security Group rule, created in this method
-            if rule_id:
-                self.client.delete_security_group_rule(rule_id)
-            #Deleting the Security Groups created in this method
-            if secgroup1:
-                self.client.delete_security_group(secgroup1)
-            if secgroup2:
-                self.client.delete_security_group(secgroup2)
-
-    @attr(type='positive')
-    def test_security_group_rules_create_delete(self):
-        # Positive test: Deletion of Security Group rule
-        # should be successfull
-        try:
-            #Creating a Security Group to add rule to it
-            s_name = rand_name('securitygroup-')
-            s_description = rand_name('description-')
-            resp, securitygroup = \
-                self.client.create_security_group(s_name, s_description)
-            securitygroup_id = securitygroup['id']
-            #Adding rules to the created Security Group
-            parent_group_id = securitygroup['id']
-            ip_protocol = 'tcp'
-            from_port = 22
-            to_port = 22
-            resp, rule = \
-                self.client.create_security_group_rule(parent_group_id,
-                                                       ip_protocol,
-                                                       from_port,
-                                                       to_port)
-        finally:
-            #Deleting the Security Group rule, created in this method
-            group_rule_id = rule['id']
-            self.client.delete_security_group_rule(group_rule_id)
-            #Deleting the Security Group created in this method
-            resp, _ = self.client.delete_security_group(securitygroup_id)
+        #Creating a Security Group to add rules to it
+        s_name = rand_name('securitygroup-')
+        s_description = rand_name('description-')
+        resp, securitygroup = \
+            self.client.create_security_group(s_name, s_description)
+        secgroup1 = securitygroup['id']
+        self.addCleanup(self.client.delete_security_group, secgroup1)
+        #Creating a Security Group so as to assign group_id to the rule
+        s_name2 = rand_name('securitygroup-')
+        s_description2 = rand_name('description-')
+        resp, securitygroup = \
+            self.client.create_security_group(s_name2, s_description2)
+        secgroup2 = securitygroup['id']
+        self.addCleanup(self.client.delete_security_group, secgroup2)
+        #Adding rules to the created Security Group with optional arguments
+        parent_group_id = secgroup1
+        ip_protocol = 'tcp'
+        from_port = 22
+        to_port = 22
+        cidr = '10.2.3.124/24'
+        group_id = secgroup2
+        resp, rule = \
+            self.client.create_security_group_rule(parent_group_id,
+                                                   ip_protocol,
+                                                   from_port,
+                                                   to_port,
+                                                   cidr=cidr,
+                                                   group_id=group_id)
+        self.addCleanup(self.client.delete_security_group_rule, rule['id'])
+        self.assertEqual(200, resp.status)
 
     @attr(type='negative')
     def test_security_group_rules_create_with_invalid_id(self):
diff --git a/tempest/tests/compute/security_groups/test_security_groups.py b/tempest/tests/compute/security_groups/test_security_groups.py
index 70a01a0..d0afde4 100644
--- a/tempest/tests/compute/security_groups/test_security_groups.py
+++ b/tempest/tests/compute/security_groups/test_security_groups.py
@@ -29,79 +29,80 @@
         super(SecurityGroupsTestJSON, cls).setUpClass()
         cls.client = cls.security_groups_client
 
+    def _delete_security_group(self, securitygroup_id):
+        resp, _ = self.client.delete_security_group(securitygroup_id)
+        self.assertEqual(202, resp.status)
+
     @attr(type='positive')
     def test_security_groups_create_list_delete(self):
         # Positive test:Should return the list of Security Groups
-        try:
-            #Create 3 Security Groups
-            security_group_list = list()
-            for i in range(3):
-                s_name = rand_name('securitygroup-')
-                s_description = rand_name('description-')
-                resp, securitygroup = \
-                    self.client.create_security_group(s_name, s_description)
-                self.assertEqual(200, resp.status)
-                security_group_list.append(securitygroup)
-            #Fetch all Security Groups and verify the list
-            #has all created Security Groups
-            resp, fetched_list = self.client.list_security_groups()
-            self.assertEqual(200, resp.status)
-            #Now check if all the created Security Groups are in fetched list
-            missing_sgs = \
-                [sg for sg in security_group_list if sg not in fetched_list]
-            self.assertFalse(missing_sgs,
-                             "Failed to find Security Group %s in fetched "
-                             "list" % ', '.join(m_group['name']
-                                                for m_group in missing_sgs))
-        finally:
-            #Delete all the Security Groups created in this method
-            for securitygroup in security_group_list:
-                resp, _ = \
-                    self.client.delete_security_group(securitygroup['id'])
-                self.assertEqual(202, resp.status)
-
-    @attr(type='positive')
-    def test_security_group_create_delete(self):
-        # Security Group should be created, verified and deleted
-        try:
+        #Create 3 Security Groups
+        security_group_list = list()
+        for i in range(3):
             s_name = rand_name('securitygroup-')
             s_description = rand_name('description-')
             resp, securitygroup = \
                 self.client.create_security_group(s_name, s_description)
             self.assertEqual(200, resp.status)
-            self.assertTrue('id' in securitygroup)
-            securitygroup_id = securitygroup['id']
-            self.assertFalse(securitygroup_id is None)
-            self.assertTrue('name' in securitygroup)
-            securitygroup_name = securitygroup['name']
-            self.assertEqual(securitygroup_name, s_name,
-                             "The created Security Group name is "
-                             "not equal to the requested name")
-        finally:
-            #Delete Security Group created in this method
-            resp, _ = self.client.delete_security_group(securitygroup['id'])
-            self.assertEqual(202, resp.status)
+            self.addCleanup(self._delete_security_group,
+                            securitygroup['id'])
+            security_group_list.append(securitygroup)
+        #Fetch all Security Groups and verify the list
+        #has all created Security Groups
+        resp, fetched_list = self.client.list_security_groups()
+        self.assertEqual(200, resp.status)
+        #Now check if all the created Security Groups are in fetched list
+        missing_sgs = \
+            [sg for sg in security_group_list if sg not in fetched_list]
+        self.assertFalse(missing_sgs,
+                         "Failed to find Security Group %s in fetched "
+                         "list" % ', '.join(m_group['name']
+                                            for m_group in missing_sgs))
+
+    #TODO(afazekas): scheduled for delete,
+    #test_security_group_create_get_delete covers it
+    @attr(type='positive')
+    def test_security_group_create_delete(self):
+        # Security Group should be created, verified and deleted
+        s_name = rand_name('securitygroup-')
+        s_description = rand_name('description-')
+        resp, securitygroup = \
+            self.client.create_security_group(s_name, s_description)
+        self.assertTrue('id' in securitygroup)
+        securitygroup_id = securitygroup['id']
+        self.addCleanup(self._delete_security_group,
+                        securitygroup_id)
+        self.assertEqual(200, resp.status)
+        self.assertFalse(securitygroup_id is None)
+        self.assertTrue('name' in securitygroup)
+        securitygroup_name = securitygroup['name']
+        self.assertEqual(securitygroup_name, s_name,
+                         "The created Security Group name is "
+                         "not equal to the requested name")
 
     @attr(type='positive')
     def test_security_group_create_get_delete(self):
         # Security Group should be created, fetched and deleted
-        try:
-            s_name = rand_name('securitygroup-')
-            s_description = rand_name('description-')
-            resp, securitygroup = \
-                self.client.create_security_group(s_name, s_description)
-            self.assertEqual(200, resp.status)
-            #Now fetch the created Security Group by its 'id'
-            resp, fetched_group = \
-                self.client.get_security_group(securitygroup['id'])
-            self.assertEqual(200, resp.status)
-            self.assertEqual(securitygroup, fetched_group,
-                             "The fetched Security Group is different "
-                             "from the created Group")
-        finally:
-            #Delete the Security Group created in this method
-            resp, _ = self.client.delete_security_group(securitygroup['id'])
-            self.assertEqual(202, resp.status)
+        s_name = rand_name('securitygroup-')
+        s_description = rand_name('description-')
+        resp, securitygroup = \
+            self.client.create_security_group(s_name, s_description)
+        self.addCleanup(self._delete_security_group,
+                        securitygroup['id'])
+
+        self.assertEqual(200, resp.status)
+        self.assertTrue('name' in securitygroup)
+        securitygroup_name = securitygroup['name']
+        self.assertEqual(securitygroup_name, s_name,
+                         "The created Security Group name is "
+                         "not equal to the requested name")
+        #Now fetch the created Security Group by its 'id'
+        resp, fetched_group = \
+            self.client.get_security_group(securitygroup['id'])
+        self.assertEqual(200, resp.status)
+        self.assertEqual(securitygroup, fetched_group,
+                         "The fetched Security Group is different "
+                         "from the created Group")
 
     @attr(type='negative')
     def test_security_group_get_nonexistant_group(self):
