Exemple #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.
Exemple #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.
Exemple #3
0
def test_ascii_should_clean_string():
    s = ascii(u'Aystringé')
    assert s == 'aystringe'
Exemple #4
0
def test_ascii_should_behave_like_a_string():
    s = ascii('mystring')
    assert str(s) == 'mystring'
Exemple #5
0
def test_ascii_should_clean_string():
    s = ascii(u'Aystringé')
    assert s == 'aystringe'
Exemple #6
0
def test_ascii_should_behave_like_a_string():
    s = ascii('mystring')
    assert str(s) == 'mystring'