From 4b5517a26878c709d4187253937aab54c95e2e33 Mon Sep 17 00:00:00 2001 From: Artom Lifshitz Date: Thu, 19 Aug 2021 15:38:38 -0400 Subject: [PATCH] Simplify test_pointer_device_type Lose the needless setup_clients(), and inline the verification. Change-Id: Ibcd3cc88676f3a3a54a8e6c86fd1c6ab3fd07577 --- .../api/compute/test_pointer_device_type.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/whitebox_tempest_plugin/api/compute/test_pointer_device_type.py b/whitebox_tempest_plugin/api/compute/test_pointer_device_type.py index 8241ef9a..b69424bf 100644 --- a/whitebox_tempest_plugin/api/compute/test_pointer_device_type.py +++ b/whitebox_tempest_plugin/api/compute/test_pointer_device_type.py @@ -27,21 +27,12 @@ LOG = logging.getLogger(__name__) class PointerDeviceTypeFromImages(base.BaseWhiteboxComputeTest): - @classmethod - def setup_clients(cls): - super(PointerDeviceTypeFromImages, cls).setup_clients() - cls.compute_images_client = cls.os_admin.compute_images_client - - def _verify_pointer_device_type_from_images(self, server_id): - domain = self.get_server_xml(server_id).text - tablet = domain.find('./input[@type="tablet"][@bus="usb"]') - mouse = domain.find('./input[@type="mouse"][@bus="ps2"]') - self.assertTrue(tablet) - self.assertTrue(mouse) - def test_pointer_device_type_from_images(self): image_id = self.copy_default_image(hw_pointer_model='usbtablet') server = self.create_test_server(image_id=image_id, wait_until='ACTIVE') - - self._verify_pointer_device_type_from_images(server['id']) + domain = self.get_server_xml(server['id']) + tablet = domain.find('./devices/input[@type="tablet"][@bus="usb"]') + mouse = domain.find('./devices/input[@type="mouse"][@bus="ps2"]') + self.assertTrue(tablet) + self.assertTrue(mouse)