Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 3
0
def test_chunked_body_ignores_case():
    ''' chunked is equivalent to CHUNKED '''
    environ = {"HTTP_TRANSFER_ENCODING": "CHUNKed"}
    assert wsgi.chunked_body(environ)
Ejemplo n.º 4
0
def test_chunked_body_missing():
    ''' By default chunked is False '''
    environ = {}
    assert not wsgi.chunked_body(environ)
Ejemplo n.º 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)
Ejemplo n.º 6
0
def test_chunked_body_ignores_case():
    ''' chunked is equivalent to CHUNKED '''
    environ = {"HTTP_TRANSFER_ENCODING": "CHUNKed"}
    assert wsgi.chunked_body(environ)
Ejemplo n.º 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)
Ejemplo n.º 8
0
def test_chunked_body_missing():
    ''' By default chunked is False '''
    environ = {}
    assert not wsgi.chunked_body(environ)