Fix handling of Github API paths and add tests
This commit is contained in:
parent
cf947962dc
commit
9558c0e937
3 changed files with 60 additions and 1 deletions
|
@ -209,8 +209,15 @@ class TestSlashJoining(unittest.TestCase):
|
|||
test_cases = [
|
||||
(['https://github.com', '/coreos-inc/' 'quay/pull/1092/files'],
|
||||
'https://github.com/coreos-inc/quay/pull/1092/files'),
|
||||
|
||||
(['https://', 'github.com/', '/coreos-inc', '/quay/pull/1092/files/'],
|
||||
'https://github.com/coreos-inc/quay/pull/1092/files'),
|
||||
|
||||
(['https://somegithub.com/', '/api/v3/'],
|
||||
'https://somegithub.com/api/v3'),
|
||||
|
||||
(['https://github.somedomain.com/', '/api/v3/'],
|
||||
'https://github.somedomain.com/api/v3'),
|
||||
]
|
||||
|
||||
for args, url in test_cases:
|
||||
|
|
Reference in a new issue