<commit_before>import unittest
import sys
import urllib2

import helper
from openid import fetchers

# XXX: make these separate test cases

def failUnlessResponseExpected(expected, actual):
    assert expected.final_url == actual.final_url
    assert expected.status == actual.status
    assert expected.body == actual.body
    got_headers = dict(actual.headers)
    del got_headers['date']
    del got_headers['server']
    assert expected.headers == got_headers

def test_fetcher(fetcher, exc, server):<commit_msg>[project @ test.test_fetchers.failUnlessResponseExpected: provide more information on failure]<commit_after>import unittest
import sys
import urllib2

import helper
from openid import fetchers

# XXX: make these separate test cases

def failUnlessResponseExpected(expected, actual):
    assert expected.final_url == actual.final_url, (
        "%r != %r" % (expected.final_url, actual.final_url))
    assert expected.status == actual.status
    assert expected.body == actual.body
    got_headers = dict(actual.headers)
    del got_headers['date']
    del got_headers['server']
    assert expected.headers == got_headers

def test_fetcher(fetcher, exc, server):
{'fraction_non_alphanumeric': 0.0875106202209006, 'fraction_numerical': 0.0016992353440951572, 'mean_word_length': 4.802955665024631, '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': '5690419', 'n_tokens_mistral': 331, 'n_tokens_neox': 327, 'n_words': 95}