def test_info(self):
        expected = {
            'description': 'Prof',
            'licensed': True,
            'name': 'Win7',
            'partial_key': '12345'
        }

        mock = MagicMock(return_value='Name: Win7\r\nDescription: Prof\r\nPartial Product Key: 12345\r\n'
                                      'License Status: Licensed')
        with patch.dict(license.__salt__, {'cmd.run': mock}):
            out = license.info()
            mock.assert_called_once_with(r'cscript C:\Windows\System32\slmgr.vbs /dli')
            self.assertEqual(out, expected)
The real injection method.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/win_license_test.py/LicenseTestCase.test_info--crossover with--dataset/ETHPy150Open sysdream/pysqli/pysqli/core/injector.py/CmdInjector.process_injection