Skip to content

Commit c15c4bc

Browse files
authored
refactor: ensure / in the end of uri
1 parent 678af39 commit c15c4bc

File tree

1 file changed

+3
-0
lines changed
  • stackinabox/util/requests_mock

1 file changed

+3
-0
lines changed

stackinabox/util/requests_mock/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ def session_registration(uri, session):
5252
reqcallable.RequestMockCallable(uri)
5353
)
5454

55+
if not uri.endswith('/'):
56+
uri += '/'
57+
5558
# Tell the session about the adapter and the URI
5659
session.mount('http://{0}'.format(uri), StackInABox.hold_out('adapter'))
5760
session.mount('https://{0}'.format(uri), StackInABox.hold_out('adapter'))

0 commit comments

Comments
 (0)