Ejemplo n.º 1
0
    def testProcessVersion25(self):
        """Tests the Process function on a Firefox Downloads database file."""
        plugin = firefox.FirefoxDownloadsPlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin(
            ['downloads.sqlite'], plugin)

        self.assertEqual(storage_writer.number_of_warnings, 0)
        self.assertEqual(storage_writer.number_of_events, 2)

        events = list(storage_writer.GetEvents())

        # Check the first page visited event.
        event = events[0]

        self.assertEqual(event.data_type, 'firefox:downloads:download')

        self.CheckTimestamp(event.timestamp, '2013-07-18 18:59:59.312000')
        self.assertEqual(event.timestamp_desc,
                         definitions.TIME_DESCRIPTION_START)

        expected_url = ('https://plaso.googlecode.com/files/'
                        'plaso-static-1.0.1-win32-vs2008.zip')
        self.assertEqual(event.url, expected_url)

        expected_full_path = 'file:///D:/plaso-static-1.0.1-win32-vs2008.zip'
        self.assertEqual(event.full_path, expected_full_path)

        self.assertEqual(event.received_bytes, 15974599)
        self.assertEqual(event.total_bytes, 15974599)
Ejemplo n.º 2
0
 def setUp(self):
   """Makes preparations before running an individual test."""
   self._plugin = firefox.FirefoxDownloadsPlugin()
Ejemplo n.º 3
0
 def setUp(self):
     """Sets up the needed objects used throughout the test."""
     self._plugin = firefox.FirefoxDownloadsPlugin()
Ejemplo n.º 4
0
 def setUp(self):
     """Sets up the needed objects used throughout the test."""
     pre_obj = event.PreprocessObject()
     self._plugin = firefox.FirefoxDownloadsPlugin(pre_obj)