diff --git a/test/integration/component/test_base_image_updation.py b/test/integration/component/test_base_image_updation.py index 8288f2c4913..2f92bd2e22a 100644 --- a/test/integration/component/test_base_image_updation.py +++ b/test/integration/component/test_base_image_updation.py @@ -26,7 +26,6 @@ #Import Local Modules from marvin.codes import (PASS, - FAIL, RECURRING) from nose.plugins.attrib import attr from marvin.cloudstackTestCase import cloudstackTestCase @@ -441,7 +440,7 @@ class TestBaseImageUpdate(cloudstackTestCase): template.id )) template.download(self.apiclient) - self.cleanup.append(template) + self._cleanup.append(template) # Wait for template status to be changed across time.sleep(self.services["sleep"]) @@ -650,13 +649,13 @@ class TestBaseImageUpdate(cloudstackTestCase): Here we are passing root disk id of vm before reboot which does not exist hence\ listing should fail") - try: + with self.assertRaises(Exception): listSnapshotPolicies = SnapshotPolicy.list( self.apiclient, volumeid=vm_with_reset_root_disk_id) - except Exception as e: - self.fail("Failed to list snapshot policies: %s" % e) - - self.assertEqual(validateList(listSnapshotPolicies)[0], FAIL,\ - "Snapshot policies list should be empty") + self.assertEqual( + validateList(listSnapshotPolicies)[0], + PASS, + "snapshot policies list validation failed" + ) return