예제 #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)
예제 #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)
예제 #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)
예제 #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)