mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-13 21:13:01 +00:00
update singleuser auth test url check
handle `?redirects`
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from subprocess import check_output
|
from subprocess import check_output
|
||||||
import sys
|
import sys
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ def test_singleuser_auth(app):
|
|||||||
# with cookies, login successful
|
# with cookies, login successful
|
||||||
r = yield async_requests.get(url, cookies=cookies)
|
r = yield async_requests.get(url, cookies=cookies)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
assert r.url.rstrip('/').endswith('/user/nandy/tree')
|
assert urlparse(r.url).path.rstrip('/').endswith('/user/nandy/tree')
|
||||||
assert r.status_code == 200
|
assert r.status_code == 200
|
||||||
|
|
||||||
# logout
|
# logout
|
||||||
|
Reference in New Issue
Block a user