update singleuser auth test url check

handle `?redirects`
This commit is contained in:
Min RK
2018-03-21 12:58:59 +01:00
parent a3a0c60804
commit 2bded65c7e

View File

@@ -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