#NEWLINE# def test_set_vif_host_backend_802qbg_config( self ) : #NEWLINE# #INDENT# conf = config . LibvirtConfigGuestInterface ( ) #NEWLINE# designer . set_vif_host_backend_802qbg_config ( conf , 'fake-devname' , 'fake-managerid' , 'fake-typeid' , 'fake-typeidversion' , 'fake-instanceid' , 'fake-tap' ) #NEWLINE# self . assertEqual ( 'direct' , conf . net_type ) #NEWLINE# self . assertEqual ( 'fake-devname' , conf . source_dev ) #NEWLINE# self . assertEqual ( 'vepa' , conf . source_mode ) #NEWLINE# self . assertEqual ( '802.1Qbg' , conf . vporttype ) #NEWLINE# expected = [ { #NEWLINE# #INDENT# 'key' : 'managerid' , #NEWLINE# 'value' : 'fake-managerid' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'key' : 'typeid' , #NEWLINE# 'value' : 'fake-typeid' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'key' : 'typeidversion' , #NEWLINE# 'value' : 'fake-typeidversion' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'key' : 'instanceid' , #NEWLINE# 'value' : 'fake-instanceid' , #NEWLINE# #UNINDENT# } ] #NEWLINE# self . assertThat ( self , matchers . DictListMatches ( conf . vportparams ) ) #NEWLINE# self . assertEqual ( 'fake-tap' , conf . target_dev )