File tree 4 files changed +13
-4
lines changed
4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 36
36
python : ' 3.7'
37
37
dist : xenial
38
38
- stage : coverage
39
- python : 3.6
39
+ python : ' 3.6'
40
40
script : codecov
Original file line number Diff line number Diff line change 1
1
.PHONY : docs
2
2
init :
3
3
pip install pipenv --upgrade
4
- pipenv install --dev --skip-lock
4
+ pipenv install --dev
5
5
test :
6
6
# This runs all of the tests, on both Python 2 and Python 3.
7
7
detox
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ verify_ssl = true
4
4
name = " pypi"
5
5
6
6
[dev-packages ]
7
- pytest = " >=2.8.0"
7
+ pytest = " >=2.8.0,<4.1 "
8
8
codecov = " *"
9
9
pytest-httpbin = " >=0.0.7"
10
10
pytest-mock = " *"
Original file line number Diff line number Diff line change 9
9
import collections
10
10
import contextlib
11
11
import warnings
12
+ import re
12
13
13
14
import io
14
15
import requests
@@ -2418,9 +2419,17 @@ class TestPreparingURLs(object):
2418
2419
)
2419
2420
)
2420
2421
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
+
2421
2430
r = requests .Request ('GET' , url = url )
2422
2431
p = r .prepare ()
2423
- assert p .url == expected
2432
+ assert normalize_percent_encode ( p .url ) == expected
2424
2433
2425
2434
@pytest .mark .parametrize (
2426
2435
'url' ,
You can’t perform that action at this time.
0 commit comments