Пример #1
0
def test_non_ascii_2():
    st = StatusAndHeaders(
        '200 OK',
        [('Custom-Header',
          u'value; filename="Éxamplè"; param; other=испытание; another')])
    res = st.to_ascii_bytes().decode('ascii')
    assert res == "\
Пример #2
0
def test_non_ascii():
    st = StatusAndHeaders(
        '200 OK', [('Custom-Header', u'attachment; filename="Éxamplè"')])
    res = st.to_ascii_bytes().decode('ascii')
    assert res == "\
Пример #3
0
def test_non_ascii_3():
    st = StatusAndHeaders('200 OK', [('Custom-Header', '“max-age=31536000″')])
    res = st.to_ascii_bytes().decode('ascii')
    assert res == "\