mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-13 04:53:01 +00:00
make sure named server URLs include trailing slash
This commit is contained in:
@@ -53,3 +53,16 @@ def test_sync_groups(app, user, group_names):
|
||||
assert user.orm_user in group.users
|
||||
else:
|
||||
assert user.orm_user not in group.users
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"server_name, path",
|
||||
[
|
||||
("", ""),
|
||||
("name", "name/"),
|
||||
("næme", "n%C3%A6me/"),
|
||||
],
|
||||
)
|
||||
def test_server_url(app, user, server_name, path):
|
||||
user_url = user.url
|
||||
assert user.server_url(server_name) == user_url + path
|
||||
|
@@ -588,7 +588,7 @@ class User:
|
||||
if not server_name:
|
||||
return self.url
|
||||
else:
|
||||
return url_path_join(self.url, url_escape_path(server_name))
|
||||
return url_path_join(self.url, url_escape_path(server_name), "/")
|
||||
|
||||
def progress_url(self, server_name=''):
|
||||
"""API URL for progress endpoint for a server with a given name"""
|
||||
|
Reference in New Issue
Block a user