Skip to content

Commit

Permalink
Test for #264
Browse files Browse the repository at this point in the history
  • Loading branch information
twm committed Jan 27, 2020
1 parent e4e1eda commit 625174a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/treq/test/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ def test_request_uri_idn(self):
b'GET', b'http://xn--bea.net',
Headers({b'accept-encoding': [b'gzip']}), None)

def test_request_uri_idn_params(self):
"""
A URL that contains non-ASCII characters can be augmented with
querystring parameters.
This reproduces treq #264.
"""
self.client.request('GET', u'http://č.net', params={'foo': 'bar'})
self.agent.request.assert_called_once_with(
b'GET', b'http://xn--bea.net?foo=bar',
Headers({b'accept-encoding': [b'gzip']}), None)

def test_request_case_insensitive_methods(self):
self.client.request('gEt', 'http://example.com/')
self.agent.request.assert_called_once_with(
Expand Down

0 comments on commit 625174a

Please sign in to comment.