<commit_before><commit_msg>Add simple test for IP regex<commit_after>import unittest

from pycroft.helpers import net


class IpRegexTestCase(unittest.TestCase):
    def test_ip_regex(self):
        regex = net.ip_regex
        self.assertTrue(regex.match("141.30.228.39"))
        self.assertFalse(regex.match("141.3330.228.39"))
        self.assertFalse(regex.match("141.3330.228.39."))
        self.assertFalse(regex.match("ddddddd"))
{'fraction_non_alphanumeric': 0.13272311212814644, 'fraction_numerical': 0.07780320366132723, 'mean_word_length': 3.8666666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 1, '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': '3188715', 'n_tokens_mistral': 163, 'n_tokens_neox': 142, 'n_words': 21}