<commit_before># coding: utf-8
import unittest
# from unittest.mock import MagicMock
import buscacep as busca


class TestBuscaCep(unittest.TestCase):
    def setUp(self):
        pass
        # self.resp = {'bairro': 'Bela Vista', 'cep': '01310-000', 'localidade': 'São Paulo/SP', 'logradouro': 'Avenida Paulista - até 610 - lado par'}

    def test_cep_not_none(self):
        with self.assertRaises(AttributeError):
            busca.busca_cep_correios(None)

    def test_cep_is_digit(self):
        with self.assertRaises(AttributeError):
            busca.busca_cep_correios(12345678)


if __name__ == '__main__':
    unittest.main()<commit_msg>test the service for match<commit_after># coding: utf-8
import unittest
# from unittest.mock import MagicMock
import buscacep as busca


class TestBuscaCep(unittest.TestCase):
    def setUp(self):
        self.resp = {'bairro': 'Bela Vista', 'cep': '01310-000', 'localidade': 'São Paulo/SP', 'logradouro': 'Avenida Paulista - até 610 - lado par'}

    def test_cep_not_none(self):
        with self.assertRaises(AttributeError):
            busca.busca_cep_correios(None)

    def test_cep_is_digit(self):
        with self.assertRaises(AttributeError):
            busca.busca_cep_correios(12345678)

    def test_cep_match(self):
        self.r = busca.busca_cep_correios('01310000').as_dict()
        self.resultado = set(self.resp.items()) ^ set(self.r.items())
        self.assertEquals(0, len(self.resultado))

if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.1215323645970938, 'fraction_numerical': 0.03236459709379128, 'mean_word_length': 3.5495495495495497, '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': '7400034', 'n_tokens_mistral': 562, 'n_tokens_neox': 516, 'n_words': 107}