From e8f64d3cc593db9d684a71e3c3a2712f0b7476a4 Mon Sep 17 00:00:00 2001 From: Srikanteswararao Talluri Date: Thu, 26 Jul 2012 14:57:46 +0530 Subject: [PATCH] fixed the validation in stopped vm test which expects an exception --- test/integration/component/test_stopped_vm.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/integration/component/test_stopped_vm.py b/test/integration/component/test_stopped_vm.py index 2d2ea05e271..8a4c45fa005 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -1884,8 +1884,7 @@ class TestUploadAttachVolume(cloudstackTestCase): 'Stopped', "Check VM state is Running or not" ) - try: + with self.assertRaises(Exception): virtual_machine.attach_volume(self.apiclient, volume) - except Exception as e: - self.fail("Failed to attach the volume: %s" % e) + self.debug("Failed to attach the volume as expected") return