Skip to content

Commit 5064062

Browse files
committed
refactor function into one-liner
1 parent 0f10269 commit 5064062

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/conftest.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,7 @@ def deserialize(self, cassette_string):
4747

4848

4949
def normalize_endpoint(uri, endpoint, default_endpoint):
50-
old = endpoint
51-
new = default_endpoint
52-
53-
if old.endswith('/'):
54-
old = old[:-1]
55-
56-
if new.endswith('/'):
57-
new = new[:-1]
58-
59-
return uri.replace(old, new)
50+
return uri.replace(endpoint.rstrip('/'), default_endpoint.rstrip('/'))
6051

6152

6253
def normalize_cassette(cassette_dict):

0 commit comments

Comments
 (0)