Example #1
0
def test_ascii_should_cache_cleaned_string(monkeypatch):
    s = ascii('mystring')
    assert s._cache

    def do_not_call_me(x):
        assert False

    monkeypatch.setattr('addok.textutils.default.alphanumerize',
                        do_not_call_me)

    ascii(s)  # Should not call alphanumerize.
Example #2
0
def test_ascii_should_cache_cleaned_string(monkeypatch):
    s = ascii('mystring')
    assert s._cache

    def do_not_call_me(x):
        assert False

    monkeypatch.setattr('addok.textutils.default.alphanumerize',
                        do_not_call_me)

    ascii(s)  # Should not call alphanumerize.
Example #3
0
def test_ascii_should_clean_string():
    s = ascii(u'Aystringé')
    assert s == 'aystringe'
Example #4
0
def test_ascii_should_behave_like_a_string():
    s = ascii('mystring')
    assert str(s) == 'mystring'
Example #5
0
def test_ascii_should_clean_string():
    s = ascii(u'Aystringé')
    assert s == 'aystringe'
Example #6
0
def test_ascii_should_behave_like_a_string():
    s = ascii('mystring')
    assert str(s) == 'mystring'