#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the Android WebViewCache plugin."""

import unittest

from plaso.parsers.sqlite_plugins import android_webviewcache

from tests.parsers.sqlite_plugins import test_lib


class AndroidWebViewCache(test_lib.SQLitePluginTestCase):
  """Tests for the Android WebViewCache database plugin."""

  def testProcess(self):
    """Test the Process function on a WebViewCache file."""
    plugin = android_webviewcache.AndroidWebViewCachePlugin()
    storage_writer = self._ParseDatabaseFileWithPlugin(
        ['webviewCache.db'], plugin)

    number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
        'event_data')
    self.assertEqual(number_of_event_data, 10)

    number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
        'extraction_warning')
    self.assertEqual(number_of_warnings, 0)

    number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
        'recovery_warning')
    self.assertEqual(number_of_warnings, 0)

    expected_event_values = {
        'content_length': 1821,
        'data_type': 'android:webviewcache',
        'expiration_time': '2013-03-28T09:48:18.000+00:00',
        'last_modified_time': None,
        'url': (
            'https://apps.skypeassets.com/static/skype.skypeloginstatic/css/'
            'print.css?_version=1.15')}

    event_data = storage_writer.GetAttributeContainerByIndex('event_data', 0)
    self.CheckEventData(event_data, expected_event_values)


if __name__ == '__main__':
  unittest.main()

273760d1684551a64781520f1a80190dc664351c
<mask token>


class AndroidWebViewCache(test_lib.SQLitePluginTestCase):
    <mask token>

    def testProcess(self):
        """Test the Process function on a WebViewCache file."""
        plugin = android_webviewcache.AndroidWebViewCachePlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin([
            'webviewCache.db'], plugin)
        number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
            'event_data')
        self.assertEqual(number_of_event_data, 10)
        number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
            'extraction_warning')
        self.assertEqual(number_of_warnings, 0)
        number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
            'recovery_warning')
        self.assertEqual(number_of_warnings, 0)
        expected_event_values = {'content_length': 1821, 'data_type':
            'android:webviewcache', 'expiration_time':
            '2013-03-28T09:48:18.000+00:00', 'last_modified_time': None,
            'url':
            'https://apps.skypeassets.com/static/skype.skypeloginstatic/css/print.css?_version=1.15'
            }
        event_data = storage_writer.GetAttributeContainerByIndex('event_data',
            0)
        self.CheckEventData(event_data, expected_event_values)


<mask token>

<mask token>


class AndroidWebViewCache(test_lib.SQLitePluginTestCase):
    """Tests for the Android WebViewCache database plugin."""

    def testProcess(self):
        """Test the Process function on a WebViewCache file."""
        plugin = android_webviewcache.AndroidWebViewCachePlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin([
            'webviewCache.db'], plugin)
        number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
            'event_data')
        self.assertEqual(number_of_event_data, 10)
        number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
            'extraction_warning')
        self.assertEqual(number_of_warnings, 0)
        number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
            'recovery_warning')
        self.assertEqual(number_of_warnings, 0)
        expected_event_values = {'content_length': 1821, 'data_type':
            'android:webviewcache', 'expiration_time':
            '2013-03-28T09:48:18.000+00:00', 'last_modified_time': None,
            'url':
            'https://apps.skypeassets.com/static/skype.skypeloginstatic/css/print.css?_version=1.15'
            }
        event_data = storage_writer.GetAttributeContainerByIndex('event_data',
            0)
        self.CheckEventData(event_data, expected_event_values)


<mask token>

<mask token>


class AndroidWebViewCache(test_lib.SQLitePluginTestCase):
    """Tests for the Android WebViewCache database plugin."""

    def testProcess(self):
        """Test the Process function on a WebViewCache file."""
        plugin = android_webviewcache.AndroidWebViewCachePlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin([
            'webviewCache.db'], plugin)
        number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
            'event_data')
        self.assertEqual(number_of_event_data, 10)
        number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
            'extraction_warning')
        self.assertEqual(number_of_warnings, 0)
        number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
            'recovery_warning')
        self.assertEqual(number_of_warnings, 0)
        expected_event_values = {'content_length': 1821, 'data_type':
            'android:webviewcache', 'expiration_time':
            '2013-03-28T09:48:18.000+00:00', 'last_modified_time': None,
            'url':
            'https://apps.skypeassets.com/static/skype.skypeloginstatic/css/print.css?_version=1.15'
            }
        event_data = storage_writer.GetAttributeContainerByIndex('event_data',
            0)
        self.CheckEventData(event_data, expected_event_values)


if __name__ == '__main__':
    unittest.main()

<mask token>
import unittest
from plaso.parsers.sqlite_plugins import android_webviewcache
from tests.parsers.sqlite_plugins import test_lib


class AndroidWebViewCache(test_lib.SQLitePluginTestCase):
    """Tests for the Android WebViewCache database plugin."""

    def testProcess(self):
        """Test the Process function on a WebViewCache file."""
        plugin = android_webviewcache.AndroidWebViewCachePlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin([
            'webviewCache.db'], plugin)
        number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
            'event_data')
        self.assertEqual(number_of_event_data, 10)
        number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
            'extraction_warning')
        self.assertEqual(number_of_warnings, 0)
        number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
            'recovery_warning')
        self.assertEqual(number_of_warnings, 0)
        expected_event_values = {'content_length': 1821, 'data_type':
            'android:webviewcache', 'expiration_time':
            '2013-03-28T09:48:18.000+00:00', 'last_modified_time': None,
            'url':
            'https://apps.skypeassets.com/static/skype.skypeloginstatic/css/print.css?_version=1.15'
            }
        event_data = storage_writer.GetAttributeContainerByIndex('event_data',
            0)
        self.CheckEventData(event_data, expected_event_values)


if __name__ == '__main__':
    unittest.main()

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the Android WebViewCache plugin."""

import unittest

from plaso.parsers.sqlite_plugins import android_webviewcache

from tests.parsers.sqlite_plugins import test_lib


class AndroidWebViewCache(test_lib.SQLitePluginTestCase):
  """Tests for the Android WebViewCache database plugin."""

  def testProcess(self):
    """Test the Process function on a WebViewCache file."""
    plugin = android_webviewcache.AndroidWebViewCachePlugin()
    storage_writer = self._ParseDatabaseFileWithPlugin(
        ['webviewCache.db'], plugin)

    number_of_event_data = storage_writer.GetNumberOfAttributeContainers(
        'event_data')
    self.assertEqual(number_of_event_data, 10)

    number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
        'extraction_warning')
    self.assertEqual(number_of_warnings, 0)

    number_of_warnings = storage_writer.GetNumberOfAttributeContainers(
        'recovery_warning')
    self.assertEqual(number_of_warnings, 0)

    expected_event_values = {
        'content_length': 1821,
        'data_type': 'android:webviewcache',
        'expiration_time': '2013-03-28T09:48:18.000+00:00',
        'last_modified_time': None,
        'url': (
            'https://apps.skypeassets.com/static/skype.skypeloginstatic/css/'
            'print.css?_version=1.15')}

    event_data = storage_writer.GetAttributeContainerByIndex('event_data', 0)
    self.CheckEventData(event_data, expected_event_values)


if __name__ == '__main__':
  unittest.main()
