Skip to content
Myr

Fixe a bug in the test client causing url parameters to be removed. This fixes #968

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 52098e1 · Browse files · 3 files+18 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+18 added−0 removed

  • other:+18 added−0 removed

3 files+18 added−0 removed

modified:flask/testsuite/testing.py+14 added
194 unmodified lines
195 c.get('/')196 self.assert_equal(called, [None])197 self.assert_equal(called, [None, None])198199 def test_full_url_request(self):200 app = flask.Flask(__name__)201 app.testing = True202203 @app.route('/action', methods=['POST'])204 def action():205 return 'x'206207 with app.test_client() as c:208 rv = c.post('http://domain.com/action?vodka=42', data={'gin': 43})209 self.assert_equal(rv.status_code, 200)210 self.assert_('gin' in flask.request.form)211 self.ssert_('vodka' in flask.request.args)212213214class SubdomainTestCase(FlaskTestCase):215216 def setUp(self):217 self.app = flask.Flask(__name__)
39 unmodified lines
modified:flask/testing.py+2 added
29 unmodified lines
30 if app_root:31 base_url += app_root.lstrip('/')32 if url.netloc:33 path = url.path34 if url.query:35 path += '?' + url.query36 return EnvironBuilder(path, base_url, *args, **kwargs)373839class FlaskClient(Client):
87 unmodified lines
modified:CHANGES+2 added
12 unmodified lines
13 useful message explaining why it is raised when a PEP 302 import hook is used14 without an `is_package()` method.15- Fixed an issue causing exceptions raised before entering a request or app16 context to be passed to teardown handlers.17- Fixed an issue with query parameters getting removed from requests in18 the test client when absolute URLs were requested.1920Version 0.10.121--------------22
457 unmodified lines