#NEWLINE# def test_libvirt_volume_driver_serial( self ) : #NEWLINE# #INDENT# libvirt_driver = volume . LibvirtVolumeDriver ( self . fake_conn ) #NEWLINE# connection_info = { #NEWLINE# #INDENT# 'driver_volume_type' : 'fake' , #NEWLINE# 'data' : { #NEWLINE# #INDENT# 'device_path' : '/foo' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'serial' : 'fake_serial' , #NEWLINE# #UNINDENT# } #NEWLINE# conf = libvirt_driver . get_config ( connection_info , self . disk_info ) #NEWLINE# tree = conf . format_dom ( ) #NEWLINE# self . assertEqual ( 'block' , tree . get ( 'type' ) ) #NEWLINE# self . assertEqual ( 'fake_serial' , tree . find ( './serial' ) . text ) #NEWLINE# self . assertIsNone ( tree . find ( './blockio' ) ) #NEWLINE# self . assertIsNone ( tree . find ( 'driver[@discard]' ) )