Simplify test_pointer_device_type
Lose the needless setup_clients(), and inline the verification. Change-Id: Ibcd3cc88676f3a3a54a8e6c86fd1c6ab3fd07577
This commit is contained in:
parent
90f5d9d0d9
commit
4b5517a268
@ -27,21 +27,12 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
class PointerDeviceTypeFromImages(base.BaseWhiteboxComputeTest):
|
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):
|
def test_pointer_device_type_from_images(self):
|
||||||
image_id = self.copy_default_image(hw_pointer_model='usbtablet')
|
image_id = self.copy_default_image(hw_pointer_model='usbtablet')
|
||||||
server = self.create_test_server(image_id=image_id,
|
server = self.create_test_server(image_id=image_id,
|
||||||
wait_until='ACTIVE')
|
wait_until='ACTIVE')
|
||||||
|
domain = self.get_server_xml(server['id'])
|
||||||
self._verify_pointer_device_type_from_images(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)
|
||||||
|
Loading…
Reference in New Issue
Block a user