<commit_before># coding: utf8
import unittest

from labonneboite.common import geocoding


class GeocodingTest(unittest.TestCase):

    def test_get_cities(self):
        all_cities = geocoding.get_cities()
        found = False
        for city in all_cities:
            if city['name'].lower().startswith("paris"):
                print city['name']
            if city['name'] == u"Paris":
                found = True
                break
        self.assertTrue(found)

    def test_saint_denis_reunion_have_correct_coordinates(self):
        city = geocoding.get_city_by_zipcode(u"97400", u"montigny-les-metz")<commit_msg>Add unit tests<commit_after># coding: utf8
import unittest

from labonneboite.common import geocoding


class GeocodingTest(unittest.TestCase):

    def test_get_cities(self):
        all_cities = geocoding.get_cities()
        found = False
        for city in all_cities:
            if city['name'].lower().startswith("paris"):
                print city['name']
            if city['name'] == u"Paris":
                found = True
                break
        self.assertTrue(found)

    def test_is_commune_id(self):
        self.assertFalse(geocoding.is_commune_id(u"75010"))
        self.assertTrue(geocoding.is_commune_id(u"75110"))

    def test_is_departement(self):
        self.assertFalse(geocoding.is_departement(u"AAAAA"))
        self.assertTrue(geocoding.is_departement(u"57"))

    def test_saint_denis_reunion_have_correct_coordinates(self):
        city = geocoding.get_city_by_zipcode(u"97400", u"montigny-les-metz")
{'fraction_non_alphanumeric': 0.10452517527087317, 'fraction_numerical': 0.015296367112810707, 'mean_word_length': 2.8199513381995134, 'pattern_counts': {'":': 2, '<': 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': '1873061', 'n_tokens_mistral': 532, 'n_tokens_neox': 510, 'n_words': 83}