mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 14:03:02 +00:00
show who you're spawning for if it's not yourself
on the spawn page
This commit is contained in:
@@ -174,6 +174,17 @@ def test_spawn_page(app):
|
||||
assert FormSpawner.options_form in r.text
|
||||
|
||||
|
||||
@pytest.mark.gen_test
|
||||
def test_spawn_page_admin(app):
|
||||
with mock.patch.dict(app.users.settings, {'spawner_class': FormSpawner}):
|
||||
cookies = yield app.login_user('admin')
|
||||
u = add_user(app.db, app=app, name='melanie')
|
||||
r = yield get_page('spawn/' + u.name, app, cookies=cookies)
|
||||
assert r.url.endswith('/spawn/' + u.name)
|
||||
assert FormSpawner.options_form in r.text
|
||||
assert "Spawning server for {}".format(u.name) in r.text
|
||||
|
||||
|
||||
@pytest.mark.gen_test
|
||||
def test_spawn_form(app):
|
||||
with mock.patch.dict(app.users.settings, {'spawner_class': FormSpawner}):
|
||||
|
Reference in New Issue
Block a user