From e1a4f37bbc1bca97c3bf47c62aafc45000e172ae Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 21 Sep 2017 13:51:24 +0200 Subject: [PATCH 1/2] cache pip packages on travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 85a43b8c..ce484ce5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: python sudo: false +cache: + - pip python: - nightly - 3.6 From 819e5e222a01af3453dd987f7e097dd7dcfdf457 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 21 Sep 2017 14:08:00 +0200 Subject: [PATCH 2/2] stop server before testing trailing-slash handling ensures `/user/name` is handled by the Hub without relying on CHP bug that was fixed in 3.0 --- jupyterhub/tests/test_pages.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jupyterhub/tests/test_pages.py b/jupyterhub/tests/test_pages.py index 692c8f14..8248ff12 100644 --- a/jupyterhub/tests/test_pages.py +++ b/jupyterhub/tests/test_pages.py @@ -134,8 +134,12 @@ def test_spawn_redirect(app): path = urlparse(r.url).path 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` - r = yield get_page('user/' + name, app, cookies=cookies) + r = yield get_page('user/' + name, app, hub=False, cookies=cookies) r.raise_for_status() path = urlparse(r.url).path assert path == ujoin(app.base_url, '/user/%s/' % name)