def test_content_length_not_specified(): ''' By default content length should be -1 ''' environ = {} assert wsgi.content_length(environ) == -1
def test_content_length_returns_int(): ''' CONTENT_LENGTH is converted to an int ''' environ = {"CONTENT_LENGTH": "5"} assert wsgi.content_length(environ) == 5