mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 07:23:00 +00:00
use admin user in test_admin
rather than relying on multi db sessions talking to each other
This commit is contained in:
@@ -72,10 +72,7 @@ def test_admin_not_admin(app):
|
|||||||
assert r.status_code == 403
|
assert r.status_code == 403
|
||||||
|
|
||||||
def test_admin(app):
|
def test_admin(app):
|
||||||
cookies = app.login_user('river')
|
cookies = app.login_user('admin')
|
||||||
u = orm.User.find(app.db, 'river')
|
|
||||||
u.admin = True
|
|
||||||
app.db.commit()
|
|
||||||
r = get_page('admin', app, cookies=cookies)
|
r = get_page('admin', app, cookies=cookies)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
assert r.url.endswith('/admin')
|
assert r.url.endswith('/admin')
|
||||||
|
Reference in New Issue
Block a user