Exemple #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)
Exemple #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)
Exemple #3
0
def test_chunked_body_ignores_case():
    ''' chunked is equivalent to CHUNKED '''
    environ = {"HTTP_TRANSFER_ENCODING": "CHUNKed"}
    assert wsgi.chunked_body(environ)
Exemple #4
0
def test_chunked_body_missing():
    ''' By default chunked is False '''
    environ = {}
    assert not wsgi.chunked_body(environ)
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)
def test_chunked_body_ignores_case():
    ''' chunked is equivalent to CHUNKED '''
    environ = {"HTTP_TRANSFER_ENCODING": "CHUNKed"}
    assert wsgi.chunked_body(environ)
def test_body_not_chunked():
    ''' Non-empty body that doesn't include 'chunked' '''
    environ = {"HTTP_TRANSFER_ENCODING": "utf8"}
    assert not wsgi.chunked_body(environ)
def test_chunked_body_missing():
    ''' By default chunked is False '''
    environ = {}
    assert not wsgi.chunked_body(environ)