Skip to content

Commit 9aacc4d

Browse files
committed
update tests for login
1 parent a9a8586 commit 9aacc4d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

notebook/auth/tests/test_login.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def test_next_bad(self):
3131
"//host" + self.url_prefix + "tree",
3232
"https://google.com",
3333
"/absolute/not/base_url",
34+
"///jupyter.org",
35+
"/\\some-host",
3436
):
3537
url = self.login(next=bad_next)
3638
self.assertEqual(url, self.url_prefix)
@@ -39,10 +41,14 @@ def test_next_bad(self):
3941
def test_next_ok(self):
4042
for next_path in (
4143
"tree/",
42-
"//" + self.url_prefix + "tree",
44+
self.base_url() + "has/host",
4345
"notebooks/notebook.ipynb",
4446
"tree//something",
4547
):
46-
expected = self.url_prefix + next_path
48+
if "://" in next_path:
49+
expected = next_path
50+
else:
51+
expected = self.url_prefix + next_path
52+
4753
actual = self.login(next=expected)
4854
self.assertEqual(actual, expected)

0 commit comments

Comments
 (0)