#NEWLINE# def test_default_nic_profile_hypervisor_kvm( self ) : #NEWLINE# #INDENT# mock = MagicMock ( return_value = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# with patch . dict ( virt . __salt__ , { #NEWLINE# #INDENT# 'config.get' : ret , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# ret = virt . _nic_profile ( 'nonexistent' , 'kvm' ) #NEWLINE# self . assertTrue ( ( len ( ret ) == 1 ) ) #NEWLINE# eth0 = ret [ 0 ] #NEWLINE# self . assertEqual ( eth0 [ 'name' ] , 'eth0' ) #NEWLINE# self . assertEqual ( eth0 [ 'type' ] , 'bridge' ) #NEWLINE# self . assertEqual ( eth0 [ 'source' ] , 'br0' ) #NEWLINE# self . assertEqual ( eth0 [ 'model' ] , 'virtio' )