#NEWLINE# def test_info( self ) : #NEWLINE# #INDENT# '\n            Test getting the info about the current license key\n        ' #NEWLINE# expected = { #NEWLINE# #INDENT# 'description' : 'Prof' , #NEWLINE# 'licensed' : True , #NEWLINE# 'name' : 'Win7' , #NEWLINE# 'partial_key' : '12345' , #NEWLINE# #UNINDENT# } #NEWLINE# mock = MagicMock ( return_value = 'Name: Win7\r\nDescription: Prof\r\nPartial Product Key: 12345\r\nLicense Status: Licensed' ) #NEWLINE# with patch . dict ( license . __salt__ , { #NEWLINE# #INDENT# 'cmd.run' : mock , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# out = license . info ( ) #NEWLINE# mock . assert_called_once_with ( 'cscript C:\\Windows\\System32\\slmgr.vbs /dli' ) #NEWLINE# self . assertEqual ( out , expected )