예제 #1
0
def test_chunked_body_matches_any_substr():
    ''' chunked can appear anywhere in the encoding '''
    environ = {"HTTP_TRANSFER_ENCODING": "this is chunked?! ಠ_ಠ"}
    assert wsgi.chunked_body(environ)
예제 #2
0
def test_body_not_chunked():
    ''' Non-empty body that doesn't include 'chunked' '''
    environ = {"HTTP_TRANSFER_ENCODING": "utf8"}
    assert not wsgi.chunked_body(environ)
예제 #3
0
def test_chunked_body_ignores_case():
    ''' chunked is equivalent to CHUNKED '''
    environ = {"HTTP_TRANSFER_ENCODING": "CHUNKed"}
    assert wsgi.chunked_body(environ)
예제 #4
0
def test_chunked_body_missing():
    ''' By default chunked is False '''
    environ = {}
    assert not wsgi.chunked_body(environ)
예제 #5
0
def test_chunked_body_matches_any_substr():
    ''' chunked can appear anywhere in the encoding '''
    environ = {"HTTP_TRANSFER_ENCODING": "this is chunked?! ಠ_ಠ"}
    assert wsgi.chunked_body(environ)
예제 #6
0
def test_chunked_body_ignores_case():
    ''' chunked is equivalent to CHUNKED '''
    environ = {"HTTP_TRANSFER_ENCODING": "CHUNKed"}
    assert wsgi.chunked_body(environ)
예제 #7
0
def test_body_not_chunked():
    ''' Non-empty body that doesn't include 'chunked' '''
    environ = {"HTTP_TRANSFER_ENCODING": "utf8"}
    assert not wsgi.chunked_body(environ)
예제 #8
0
def test_chunked_body_missing():
    ''' By default chunked is False '''
    environ = {}
    assert not wsgi.chunked_body(environ)