Skip to content

Commit 334be4d

Browse files
authored
Merge branch 'master' into patch-2
2 parents b49547f + 67a9ed4 commit 334be4d

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ jobs:
3636
python: '3.7'
3737
dist: xenial
3838
- stage: coverage
39-
python: 3.6
39+
python: '3.6'
4040
script: codecov

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: docs
22
init:
33
pip install pipenv --upgrade
4-
pipenv install --dev --skip-lock
4+
pipenv install --dev
55
test:
66
# This runs all of the tests, on both Python 2 and Python 3.
77
detox

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ verify_ssl = true
44
name = "pypi"
55

66
[dev-packages]
7-
pytest = ">=2.8.0"
7+
pytest = ">=2.8.0,<4.1"
88
codecov = "*"
99
pytest-httpbin = ">=0.0.7"
1010
pytest-mock = "*"

tests/test_requests.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import collections
1010
import contextlib
1111
import warnings
12+
import re
1213

1314
import io
1415
import requests
@@ -2418,9 +2419,17 @@ class TestPreparingURLs(object):
24182419
)
24192420
)
24202421
def test_preparing_url(self, url, expected):
2422+
2423+
def normalize_percent_encode(x):
2424+
# Helper function that normalizes equivalent
2425+
# percent-encoded bytes before comparisons
2426+
for c in re.findall(r'%[a-fA-F0-9]{2}', x):
2427+
x = x.replace(c, c.upper())
2428+
return x
2429+
24212430
r = requests.Request('GET', url=url)
24222431
p = r.prepare()
2423-
assert p.url == expected
2432+
assert normalize_percent_encode(p.url) == expected
24242433

24252434
@pytest.mark.parametrize(
24262435
'url',

0 commit comments

Comments
 (0)