+ def test_020_delete_image(self):
+ self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
+ self.__class__.test_index,
+ inspect.currentframe().f_code.co_name)
+ self.__class__.test_index += 1
+
+ image_id = test_config["vim_conn"].delete_image(self.__class__.image_id)
+ self.assertEqual(type(image_id),str)
+
+ def test_030_delete_image_negative(self):
+ Non_exist_image_id = str(uuid.uuid4())
+
+ self.__class__.test_text = "{}.{}. TEST {}".format(test_config["test_number"],
+ self.__class__.test_index,
+ inspect.currentframe().f_code.co_name)
+ self.__class__.test_index += 1
+
+ with self.assertRaises(Exception) as context:
+ test_config["vim_conn"].delete_image(Non_exist_image_id)
+
+ self.assertEqual((context.exception).http_code, 404)
+