def test_goad_passes_body_through(): environ = {} environ[b'REQUEST_METHOD'] = b'' environ[b'SERVER_PROTOCOL'] = b'' environ[b'wsgi.input'] = b'\xdead\xbeef' expected = (b'', b'', b'', b'', {}, b'\xdead\xbeef') actual = kick_against_goad(environ) assert actual == expected
def test_goad_makes_franken_headers(): environ = {} environ[b'REQUEST_METHOD'] = b'' environ[b'SERVER_PROTOCOL'] = b'' environ[b'HTTP_FOO_BAR'] = b'baz=buz' environ[b'wsgi.input'] = b'' expected = (b'', b'', b'', b'', {b'FOO-BAR': b'baz=buz'}, b'') actual = kick_against_goad(environ) assert actual == expected
def test_goad_makes_franken_uri(): environ = {} environ[b'REQUEST_METHOD'] = b'' environ[b'SERVER_PROTOCOL'] = b'' environ[b'PATH_INFO'] = b'/cheese' environ[b'QUERY_STRING'] = b'foo=bar' environ[b'wsgi.input'] = b'' expected = (b'', b'/cheese?foo=bar', b'', b'', {}, b'') actual = kick_against_goad(environ) assert actual == expected