# coding utf-8

from tortue.main.common.str.str_cleaner import StrCleaner


def test_keep_only_alphanumeric_chars():
    # Given
    s = 'abc!'

    # When
    s = StrCleaner.keep_alphanumeric_chars_only(s)

    # Then
    assert s == 'abc'


def test_trim_and_to_lower():
    # Given
    s = ' aBc '

    # When
    s = StrCleaner.trim_and_lower(s)

    # Then
    assert s == 'abc'


def test_remove_illegal_char_and_format():
    # Given
    s = ' ?aB c! '

    # When
    s = StrCleaner.clean(s)

    # Then
    assert s == 'ab c'


def test_remove_break_line():
    # Given
    s = 'nationalité belge\nelle est'

    # When
    s = StrCleaner.clean(s)

    # Then
    assert s == 'nationalité belge elle est'


def test_double_white_space():
    # Given
    s = 'b    a'

    # When
    s = StrCleaner.clean(s)

    # Then
    assert s == 'b a'
e3c30baaf575bc5841c91130f89a5f1b5fa80a4a
<mask token>


def test_keep_only_alphanumeric_chars():
    s = 'abc!'
    s = StrCleaner.keep_alphanumeric_chars_only(s)
    assert s == 'abc'


def test_trim_and_to_lower():
    s = ' aBc '
    s = StrCleaner.trim_and_lower(s)
    assert s == 'abc'


<mask token>


def test_remove_break_line():
    s = 'nationalité belge\nelle est'
    s = StrCleaner.clean(s)
    assert s == 'nationalité belge elle est'


<mask token>

<mask token>


def test_keep_only_alphanumeric_chars():
    s = 'abc!'
    s = StrCleaner.keep_alphanumeric_chars_only(s)
    assert s == 'abc'


def test_trim_and_to_lower():
    s = ' aBc '
    s = StrCleaner.trim_and_lower(s)
    assert s == 'abc'


<mask token>


def test_remove_break_line():
    s = 'nationalité belge\nelle est'
    s = StrCleaner.clean(s)
    assert s == 'nationalité belge elle est'


def test_double_white_space():
    s = 'b    a'
    s = StrCleaner.clean(s)
    assert s == 'b a'

<mask token>


def test_keep_only_alphanumeric_chars():
    s = 'abc!'
    s = StrCleaner.keep_alphanumeric_chars_only(s)
    assert s == 'abc'


def test_trim_and_to_lower():
    s = ' aBc '
    s = StrCleaner.trim_and_lower(s)
    assert s == 'abc'


def test_remove_illegal_char_and_format():
    s = ' ?aB c! '
    s = StrCleaner.clean(s)
    assert s == 'ab c'


def test_remove_break_line():
    s = 'nationalité belge\nelle est'
    s = StrCleaner.clean(s)
    assert s == 'nationalité belge elle est'


def test_double_white_space():
    s = 'b    a'
    s = StrCleaner.clean(s)
    assert s == 'b a'

from tortue.main.common.str.str_cleaner import StrCleaner


def test_keep_only_alphanumeric_chars():
    s = 'abc!'
    s = StrCleaner.keep_alphanumeric_chars_only(s)
    assert s == 'abc'


def test_trim_and_to_lower():
    s = ' aBc '
    s = StrCleaner.trim_and_lower(s)
    assert s == 'abc'


def test_remove_illegal_char_and_format():
    s = ' ?aB c! '
    s = StrCleaner.clean(s)
    assert s == 'ab c'


def test_remove_break_line():
    s = 'nationalité belge\nelle est'
    s = StrCleaner.clean(s)
    assert s == 'nationalité belge elle est'


def test_double_white_space():
    s = 'b    a'
    s = StrCleaner.clean(s)
    assert s == 'b a'

# coding utf-8

from tortue.main.common.str.str_cleaner import StrCleaner


def test_keep_only_alphanumeric_chars():
    # Given
    s = 'abc!'

    # When
    s = StrCleaner.keep_alphanumeric_chars_only(s)

    # Then
    assert s == 'abc'


def test_trim_and_to_lower():
    # Given
    s = ' aBc '

    # When
    s = StrCleaner.trim_and_lower(s)

    # Then
    assert s == 'abc'


def test_remove_illegal_char_and_format():
    # Given
    s = ' ?aB c! '

    # When
    s = StrCleaner.clean(s)

    # Then
    assert s == 'ab c'


def test_remove_break_line():
    # Given
    s = 'nationalité belge\nelle est'

    # When
    s = StrCleaner.clean(s)

    # Then
    assert s == 'nationalité belge elle est'


def test_double_white_space():
    # Given
    s = 'b    a'

    # When
    s = StrCleaner.clean(s)

    # Then
    assert s == 'b a'