def testRun(self): """Tests the Run function.""" plugin = windows.WindowsSystemVersionPlugin() knowledge_base = self._RunWindowsRegistryPluginOnSoftware(plugin) osversion = knowledge_base.GetValue(u'operating_system_version') self.assertEqual(osversion, u'6.1')
def testParseValueData(self): """Tests the _ParseValueData function.""" plugin = windows.WindowsSystemVersionPlugin() knowledge_base = self._RunPreprocessorPluginOnWindowsRegistryValueSoftware( plugin) osversion = knowledge_base.GetValue(u'operating_system_version') self.assertEqual(osversion, u'6.1')
def testParseValueData(self): """Tests the _ParseValueData function.""" test_file_path = self._GetTestFilePath(['SOFTWARE']) self._SkipIfPathNotExists(test_file_path) plugin = windows.WindowsSystemVersionPlugin() knowledge_base_object = ( self._RunPreprocessorPluginOnWindowsRegistryValueSoftware(plugin)) system_version = knowledge_base_object.GetValue('operating_system_version') self.assertEqual(system_version, '6.1')
def testParseValueData(self): """Tests the _ParseValueData function.""" test_file_path = self._GetTestFilePath(['SOFTWARE']) self._SkipIfPathNotExists(test_file_path) storage_writer = self._CreateTestStorageWriter() plugin = windows.WindowsSystemVersionPlugin() test_mediator = self._RunPreprocessorPluginOnWindowsRegistryValueSoftware( storage_writer, plugin) self.assertEqual(storage_writer.number_of_preprocessing_warnings, 0) system_version = test_mediator.knowledge_base.GetValue( 'operating_system_version') self.assertEqual(system_version, '6.1')