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

from validators import ValidationFailure
from validators.i18n.fi import fi_business_id, fi_ssn


@pytest.mark.parametrize(('value',), [
    ('2336509-6',),  # Supercell
    ('0112038-9',),  # Fast Monkeys
    ('2417581-7',),  # Nokia
])
def test_returns_true_on_valid_business_id(value):
    assert fi_business_id(value)


@pytest.mark.parametrize(('value',), [
    (None,),
    ('',),
    ('1233312312',),
    ('1333333-8',),
    ('1231233-9',),
])
def test_returns_failed_validation_on_invalid_email(value):
    assert isinstance(fi_business_id(value), ValidationFailure)


@pytest.mark.parametrize(('value',), [
    ('010190-002R',),
    ('010101-0101',),
    ('010101+0101',),
    ('010101A0101',),
    ('010190-900P',),
])
def test_returns_true_on_valid_ssn(value):
    assert fi_ssn(value)
<commit_msg>Fix function name (#90)<commit_after># -*- coding: utf-8 -*-
import pytest

from validators import ValidationFailure
from validators.i18n.fi import fi_business_id, fi_ssn


@pytest.mark.parametrize(('value',), [
    ('2336509-6',),  # Supercell
    ('0112038-9',),  # Fast Monkeys
    ('2417581-7',),  # Nokia
])
def test_returns_true_on_valid_business_id(value):
    assert fi_business_id(value)


@pytest.mark.parametrize(('value',), [
    (None,),
    ('',),
    ('1233312312',),
    ('1333333-8',),
    ('1231233-9',),
])
def test_returns_failed_validation_on_invalid_business_id(value):
    assert isinstance(fi_business_id(value), ValidationFailure)


@pytest.mark.parametrize(('value',), [
    ('010190-002R',),
    ('010101-0101',),
    ('010101+0101',),
    ('010101A0101',),
    ('010190-900P',),
])
def test_returns_true_on_valid_ssn(value):
    assert fi_ssn(value)

{'fraction_non_alphanumeric': 0.18563218390804598, 'fraction_numerical': 0.11724137931034483, 'mean_word_length': 4.616129032258065, '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': '4473790', 'n_tokens_mistral': 802, 'n_tokens_neox': 670, 'n_words': 95}