'tests that image description is editable
* creates image from locally downloaded file
* verifies the image appears in the images table as active
* toggle edit action and adds some description
* verifies that edit action was successful
* verifies that new description is seen on image details page
* toggle edit action and changes image name
* verifies that edit action was successful
* verifies that image with new name is seen on the page
* deletes the image
* verifies the image does not appear in the table after deletion'

def test_edit_image_description_and_name(self):

    new_description_text = helpers.gen_random_resource_name('description')
    new_image_name = helpers.gen_random_resource_name('image')
    with helpers.gen_temporary_file() as file_name:
        images_page = self.image_create(local_file=file_name)
        images_page.edit_image(self.IMAGE_NAME, description=new_description_text)
        self.assertTrue(images_page.find_message_and_dismiss(messages.SUCCESS))
        self.assertFalse(images_page.find_message_and_dismiss(messages.ERROR))
        results = images_page.check_image_details(self.IMAGE_NAME, {'Description': new_description_text})
        self.assertSequenceTrue(results)
        images_page = self.images_page
        images_page.edit_image(self.IMAGE_NAME, new_name=new_image_name)
        self.assertTrue(images_page.find_message_and_dismiss(messages.SUCCESS))
        self.assertFalse(images_page.find_message_and_dismiss(messages.ERROR))
        results = images_page.check_image_details(new_image_name, {'Name': new_image_name})
        self.assertSequenceTrue(results)
        self.image_delete(new_image_name)
