#NEWLINE# @ skipIf ( ( sys . version_info < ( 2 , 7 ) ) , 'ElementTree version 1.3 required which comes with Python 2.7' ) #NEWLINE# def test_gen_xml_for_serial_console( self ) : #NEWLINE# #INDENT# diskp = virt . _disk_profile ( 'default' , 'kvm' ) #NEWLINE# nicp = virt . _nic_profile ( 'default' , 'kvm' ) #NEWLINE# xml_data = virt . _gen_xml ( 'hello' , 1 , 512 , diskp , nicp , 'kvm' , serial_type = 'pty' , console = True ) #NEWLINE# root = ET . fromstring ( nicp ) #NEWLINE# self . assertEqual ( root . find ( 'devices/serial' ) . attrib [ 'type' ] , 'pty' ) #NEWLINE# self . assertEqual ( root . find ( 'devices/console' ) . attrib [ 'type' ] , 'pty' )