We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9a8586 commit 9aacc4dCopy full SHA for 9aacc4d
notebook/auth/tests/test_login.py
@@ -31,6 +31,8 @@ def test_next_bad(self):
31
"//host" + self.url_prefix + "tree",
32
"https://google.com",
33
"/absolute/not/base_url",
34
+ "///jupyter.org",
35
+ "/\\some-host",
36
):
37
url = self.login(next=bad_next)
38
self.assertEqual(url, self.url_prefix)
@@ -39,10 +41,14 @@ def test_next_bad(self):
39
41
def test_next_ok(self):
40
42
for next_path in (
43
"tree/",
- "//" + self.url_prefix + "tree",
44
+ self.base_url() + "has/host",
45
"notebooks/notebook.ipynb",
46
"tree//something",
47
- 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
+
53
actual = self.login(next=expected)
54
self.assertEqual(actual, expected)
0 commit comments