Esempio n. 1
0
def test_content_disposition_ascii():
    ret = util.get_content_disposition("Content-Disposition: attachment; filename=foo.txt")
    assert ret == u"foo.txt"
    assert isinstance(ret, unicode)
Esempio n. 2
0
def test_content_disposition_ascii():
    ret = util.get_content_disposition(
        "Content-Disposition: attachment; filename=foo.txt")
    assert ret == u"foo.txt"
    assert isinstance(ret, unicode)
Esempio n. 3
0
def test_content_disposition_unicode():
    ret = util.get_content_disposition("Content-Disposition: attachment; filename*= UTF-8''%e2%82%ac%20rates")
    assert ret == u"€ rates"
    assert isinstance(ret, unicode)
Esempio n. 4
0
def test_content_disposition_unicode():
    ret = util.get_content_disposition(
        "Content-Disposition: attachment; filename*= UTF-8''%e2%82%ac%20rates")
    assert ret == u"€ rates"
    assert isinstance(ret, unicode)