Merge pull request #1441 from minrk/test-trailing-slash-wtf

debug intermittent failure on Travis
This commit is contained in:
Min RK
2017-09-21 14:18:08 +02:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
language: python language: python
sudo: false sudo: false
cache:
- pip
python: python:
- nightly - nightly
- 3.6 - 3.6

View File

@@ -134,8 +134,12 @@ def test_spawn_redirect(app):
path = urlparse(r.url).path path = urlparse(r.url).path
assert path == ujoin(app.base_url, '/user/%s/' % name) assert path == ujoin(app.base_url, '/user/%s/' % name)
# stop server to ensure /user/name is handled by the Hub
r = yield api_request(app, 'users', name, 'server', method='delete', cookies=cookies)
r.raise_for_status()
# test handing of trailing slash on `/user/name` # test handing of trailing slash on `/user/name`
r = yield get_page('user/' + name, app, cookies=cookies) r = yield get_page('user/' + name, app, hub=False, cookies=cookies)
r.raise_for_status() r.raise_for_status()
path = urlparse(r.url).path path = urlparse(r.url).path
assert path == ujoin(app.base_url, '/user/%s/' % name) assert path == ujoin(app.base_url, '/user/%s/' % name)