options_form is a regular configurable

now that we can assume User.spawner exists at all times
This commit is contained in:
Min RK
2015-12-17 16:00:40 +01:00
parent 41ea696546
commit f9c9c2b471
6 changed files with 29 additions and 21 deletions

View File

@@ -65,14 +65,14 @@ def test_spawn_redirect(app):
assert r.url.endswith('/wash')
def test_spawn_page(app):
with mock.patch.dict(app.tornado_application.settings, {'spawner_class': FormSpawner}):
with mock.patch.dict(app.users.settings, {'spawner_class': FormSpawner}):
cookies = app.login_user('jones')
r = get_page('spawn', app, cookies=cookies)
assert r.url.endswith('/spawn')
assert FormSpawner.options_form in r.text
def test_spawn_form(app, io_loop):
with mock.patch.dict(app.tornado_application.settings, {'spawner_class': FormSpawner}):
with mock.patch.dict(app.users.settings, {'spawner_class': FormSpawner}):
base_url = ujoin(app.proxy.public_server.host, app.hub.server.base_url)
cookies = app.login_user('jones')
orm_u = orm.User.find(app.db, 'jones')