def testRun(self): """Tests the Run function.""" plugin = windows.WindowsSystemProductPlugin() knowledge_base = self._RunWindowsRegistryPluginOnSoftware(plugin) osversion = knowledge_base.GetValue(u'operating_system_product') self.assertEqual(osversion, u'Windows 7 Ultimate')
def testParseValueData(self): """Tests the _ParseValueData function.""" plugin = windows.WindowsSystemProductPlugin() knowledge_base = self._RunPreprocessorPluginOnWindowsRegistryValueSoftware( plugin) osversion = knowledge_base.GetValue(u'operating_system_product') self.assertEqual(osversion, u'Windows 7 Ultimate')
def testParseValueData(self): """Tests the _ParseValueData function.""" test_file_path = self._GetTestFilePath(['SOFTWARE']) self._SkipIfPathNotExists(test_file_path) plugin = windows.WindowsSystemProductPlugin() knowledge_base_object = ( self._RunPreprocessorPluginOnWindowsRegistryValueSoftware(plugin)) system_product = knowledge_base_object.GetValue('operating_system_product') self.assertEqual(system_product, 'Windows 7 Ultimate')
def testParseValueData(self): """Tests the _ParseValueData function.""" test_file_path = self._GetTestFilePath(['SOFTWARE']) self._SkipIfPathNotExists(test_file_path) storage_writer = self._CreateTestStorageWriter() plugin = windows.WindowsSystemProductPlugin() test_mediator = self._RunPreprocessorPluginOnWindowsRegistryValueSoftware( storage_writer, plugin) self.assertEqual(storage_writer.number_of_preprocessing_warnings, 0) system_product = test_mediator.knowledge_base.GetValue( 'operating_system_product') self.assertEqual(system_product, 'Windows 7 Ultimate')