Пример #1
0
    def testProcess(self):
        """Tests the Process function on a MacKeeper Cache database file."""
        plugin = mackeeper_cache.MacKeeperCachePlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin(
            ['mackeeper_cache.db'], plugin)

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

        events = list(storage_writer.GetEvents())

        event = events[41]

        self.CheckTimestamp(event.timestamp, '2013-07-12 19:30:31.000000')

        event_data = self._GetEventDataOfEvent(storage_writer, event)

        expected_message = (
            'Chat Outgoing Message : I have received your system scan report and '
            'I will start analyzing it right now. [ URL: http://support.kromtech.'
            'net/chat/listen/12828340738351e0593f987450z40787/?client-id=51e0593f'
            'a1a24468673655&callback=jQuery183013571173651143909_1373657420912&_='
            '1373657423647 Event ID: 16059074 Room: '
            '12828340738351e0593f987450z40787 ]')

        expected_short_message = (
            'I have received your system scan report and I will start analyzing '
            'it right now.')

        self._TestGetMessageStrings(event_data, expected_message,
                                    expected_short_message)
Пример #2
0
    def testProcess(self):
        """Tests the Process function on a MacKeeper Cache database file."""
        plugin = mackeeper_cache.MacKeeperCachePlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin(
            ['mackeeper_cache.db'], plugin)

        self.assertEqual(storage_writer.number_of_events, 198)
        self.assertEqual(storage_writer.number_of_extraction_warnings, 0)
        self.assertEqual(storage_writer.number_of_recovery_warnings, 0)

        events = list(storage_writer.GetEvents())

        expected_event_values = {
            'data_type':
            'mackeeper:cache',
            'date_time':
            '2013-07-12 19:30:31',
            'description':
            'Chat Outgoing Message',
            'record_id':
            16059074,
            'room':
            '12828340738351e0593f987450z40787',
            'text':
            ('I have received your system scan report and I will start '
             'analyzing it right now.'),
            'url':
            ('http://support.kromtech.net/chat/listen/12828340738351e0593f98745'
             '0z40787/?client-id=51e0593fa1a24468673655&callback=jQuery18301357'
             '1173651143909_1373657420912&_=1373657423647')
        }

        self.CheckEventValues(storage_writer, events[41],
                              expected_event_values)
Пример #3
0
 def setUp(self):
     """Sets up the needed objects used throughout the test."""
     self._plugin = mackeeper_cache.MacKeeperCachePlugin()
Пример #4
0
 def setUp(self):
     """Sets up the needed objects used throughout the test."""
     pre_obj = event.PreprocessObject()
     self._plugin = mackeeper_cache.MacKeeperCachePlugin(pre_obj)
Пример #5
0
 def setUp(self):
     """Makes preparations before running an individual test."""
     self._plugin = mackeeper_cache.MacKeeperCachePlugin()