Ejemplo n.º 1
0
 def test_installed_diff(self):
     '''
         Test to see if the given license key is installed when the key is different
     '''
     mock = MagicMock(return_value='Partial Product Key: 12345')
     with patch.dict(license.__salt__, {'cmd.run': mock}):
         out = license.installed('AAAAA-AAAAA-AAAAA-AAAA-AAAAA-ABCDE')
         mock.assert_called_once_with(r'cscript C:\Windows\System32\slmgr.vbs /dli')
         self.assertFalse(out)
Ejemplo n.º 2
0
 def test_installed_diff(self):
     '''
         Test to see if the given license key is installed when the key is different
     '''
     mock = MagicMock(return_value='Partial Product Key: 12345')
     with patch.dict(win_license.__salt__, {'cmd.run': mock}):
         out = win_license.installed('AAAAA-AAAAA-AAAAA-AAAA-AAAAA-ABCDE')
         mock.assert_called_once_with(r'cscript C:\Windows\System32\slmgr.vbs /dli')
         self.assertFalse(out)
Ejemplo n.º 3
0
 def test_installed_diff(self):
     """
         Test to see if the given license key is installed when the key is different
     """
     mock = MagicMock(return_value="Partial Product Key: 12345")
     with patch.dict(win_license.__salt__, {"cmd.run": mock}):
         out = win_license.installed("AAAAA-AAAAA-AAAAA-AAAA-AAAAA-ABCDE")
         mock.assert_called_once_with(r"cscript C:\Windows\System32\slmgr.vbs /dli")
         self.assertFalse(out)