Esempio n. 1
0
    def testParseValueData(self):
        """Tests the _ParseValueData function."""
        plugin = windows.WindowsTimeZonePlugin()
        knowledge_base = self._RunPreprocessorPluginOnWindowsRegistryValueSystem(
            plugin)

        self.assertEqual(knowledge_base.timezone.zone, u'EST5EDT')
Esempio n. 2
0
  def testParseValueData(self):
    """Tests the _ParseValueData function."""
    test_file_path = self._GetTestFilePath(['SYSTEM'])
    self._SkipIfPathNotExists(test_file_path)

    plugin = windows.WindowsTimeZonePlugin()
    knowledge_base_object = (
        self._RunPreprocessorPluginOnWindowsRegistryValueSystem(plugin))

    self.assertEqual(knowledge_base_object.timezone.zone, 'EST5EDT')
Esempio n. 3
0
    def testParseValueData(self):
        """Tests the _ParseValueData function."""
        test_file_path = self._GetTestFilePath(['SYSTEM'])
        self._SkipIfPathNotExists(test_file_path)

        storage_writer = self._CreateTestStorageWriter()

        plugin = windows.WindowsTimeZonePlugin()
        test_mediator = self._RunPreprocessorPluginOnWindowsRegistryValueSystem(
            storage_writer, plugin)

        self.assertEqual(storage_writer.number_of_preprocessing_warnings, 0)

        self.assertEqual(test_mediator.knowledge_base.timezone.zone,
                         'America/New_York')
Esempio n. 4
0
    def testParseValueData(self):
        """Tests the _ParseValueData function."""
        test_file_path = self._GetTestFilePath(['SYSTEM'])
        self._SkipIfPathNotExists(test_file_path)

        storage_writer = self._CreateTestStorageWriter()

        plugin = windows.WindowsTimeZonePlugin()
        test_mediator = self._RunPreprocessorPluginOnWindowsRegistryValueSystem(
            storage_writer, plugin)

        # Unable to map: "@tzres.dll,-112" to time zone with error: Unsupported
        # time zone: @tzres.dll,-112
        number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
            'preprocessing_warning')
        self.assertEqual(number_of_warnings, 1)

        self.assertEqual(test_mediator.knowledge_base.timezone.zone,
                         'America/New_York')