mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-13 13:03: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
|
||||
import sys
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -33,7 +34,7 @@ def test_singleuser_auth(app):
|
||||
# with cookies, login successful
|
||||
r = yield async_requests.get(url, cookies=cookies)
|
||||
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
|
||||
|
||||
# logout
|
||||
|
Reference in New Issue
Block a user