Skip to content

Instantly share code, notes, and snippets.

@untitaker
Created June 8, 2013 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save untitaker/5735822 to your computer and use it in GitHub Desktop.
Save untitaker/5735822 to your computer and use it in GitHub Desktop.
diff --git a/werkzeug/testsuite/wrappers.py b/werkzeug/testsuite/wrappers.py
index 751880d..cc78030 100644
--- a/werkzeug/testsuite/wrappers.py
+++ b/werkzeug/testsuite/wrappers.py
@@ -50,7 +50,8 @@ def request_demo_app(environ, start_response):
'form': request.form,
'form_as_list': list(request.form.lists()),
'environ': prepare_environ_pickle(request.environ),
- 'data': request.data
+ 'data': request.data,
+ 'url': request.url
})]
@@ -116,6 +117,10 @@ class WrappersTestCase(WerkzeugTestCase):
self.assert_strict_equal(response['args'], MultiDict([('a', u'b')]))
self.assert_strict_equal(response['form'], MultiDict())
+ # #368?
+ response = client.get('/foo')
+ self.assert_strict_equal(response['url'], u'http://localhost/foo')
+
def test_query_string_is_bytes(self):
req = wrappers.Request.from_values(u'/?foo=%2f')
self.assert_strict_equal(req.query_string, b'foo=%2f')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment