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)
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)
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)