<commit_before># -*- coding: utf-8 -*-

import unittest
from urlparse import parse_qs, urlparse

from requests.exceptions import HTTPError
from mock import MagicMock, Mock, patch
from dns.resolver import NXDOMAIN
from nose_parameterized import parameterized
from cachetools.func import lru_cache

from spam_lists.service_models import DNSBL, GoogleSafeBrowsing,\
HostCollection, HostList, HpHosts
from spam_lists.exceptions import UnathorizedAPIKeyError, UnknownCodeError

from .base_test_cases import BaseHostListTest, BaseUrlTesterTest,\
ClientGetExpectedItemsProvider, GeneratedUrlTesterTest, IPv6SupportTest,\
TestFunctionDoesNotHandleProvider, UrlHostTesterTestSetupProvider

@lru_cache()
def host_list_host_factory(h):
    host_object = MagicMock()
    host_object.__str__.return_value = h
    return host_object


class HostListTest(
                   UrlHostTesterTestSetupProvider,
                   GeneratedUrlTesterTest,<commit_msg>Add BaseHostListTest to parent classes of HostListTest<commit_after># -*- coding: utf-8 -*-

import unittest
from urlparse import parse_qs, urlparse

from requests.exceptions import HTTPError
from mock import MagicMock, Mock, patch
from dns.resolver import NXDOMAIN
from nose_parameterized import parameterized
from cachetools.func import lru_cache

from spam_lists.service_models import DNSBL, GoogleSafeBrowsing,\
HostCollection, HostList, HpHosts
from spam_lists.exceptions import UnathorizedAPIKeyError, UnknownCodeError

from .base_test_cases import BaseHostListTest, BaseUrlTesterTest,\
ClientGetExpectedItemsProvider, GeneratedUrlTesterTest, IPv6SupportTest,\
TestFunctionDoesNotHandleProvider, UrlHostTesterTestSetupProvider

@lru_cache()
def host_list_host_factory(h):
    host_object = MagicMock()
    host_object.__str__.return_value = h
    return host_object


class HostListTest(
                   BaseHostListTest,
                   UrlHostTesterTestSetupProvider,
                   GeneratedUrlTesterTest,
{'fraction_non_alphanumeric': 0.051269035532994923, 'fraction_numerical': 0.0020304568527918783, 'mean_word_length': 5.257142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3280630', 'n_tokens_mistral': 568, 'n_tokens_neox': 548, 'n_words': 142}