Pull request feedback fixes
This commit is contained in:
@@ -92,7 +92,8 @@ class Request(object):
|
|||||||
self.app = env['SCRIPT_NAME']
|
self.app = env['SCRIPT_NAME']
|
||||||
self.method = env['REQUEST_METHOD']
|
self.method = env['REQUEST_METHOD']
|
||||||
self.path = env['PATH_INFO'] or '/'
|
self.path = env['PATH_INFO'] or '/'
|
||||||
# QUERY_STRING isn't required to be in env so lets check
|
|
||||||
|
# QUERY_STRING isn't required to be in env, so let's check
|
||||||
if 'QUERY_STRING' in env:
|
if 'QUERY_STRING' in env:
|
||||||
self.query_string = query_string = env['QUERY_STRING']
|
self.query_string = query_string = env['QUERY_STRING']
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -22,10 +22,9 @@ class TestReqVars(testing.TestSuite):
|
|||||||
env = testing.create_environ()
|
env = testing.create_environ()
|
||||||
if 'QUERY_STRING' in env:
|
if 'QUERY_STRING' in env:
|
||||||
del env['QUERY_STRING']
|
del env['QUERY_STRING']
|
||||||
# should not cause an exception when Request instantiated
|
|
||||||
|
# Should not cause an exception when Request instantiated
|
||||||
req = Request(env)
|
req = Request(env)
|
||||||
# just make sure we don't cause regression
|
|
||||||
self.assertIsNone(req.get_param("foo"))
|
|
||||||
|
|
||||||
def test_reconstruct_url(self):
|
def test_reconstruct_url(self):
|
||||||
req = self.req
|
req = self.req
|
||||||
|
|||||||
Reference in New Issue
Block a user