From e025d58f6ec5061dc6e0782444af2eebaac46d6d Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 28 Feb 2018 14:29:40 +0100 Subject: [PATCH] fix mocks for spawner config --- jupyterhub/tests/conftest.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jupyterhub/tests/conftest.py b/jupyterhub/tests/conftest.py index 0f408965..870bf15e 100644 --- a/jupyterhub/tests/conftest.py +++ b/jupyterhub/tests/conftest.py @@ -139,7 +139,7 @@ def no_patience(app): @fixture def slow_spawn(app): """Fixture enabling SlowSpawner""" - with mock.patch.dict(app.tornado_settings, + with mock.patch.dict(app.users.settings, {'spawner_class': mocking.SlowSpawner}): yield @@ -147,7 +147,7 @@ def slow_spawn(app): @fixture def never_spawn(app): """Fixture enabling NeverSpawner""" - with mock.patch.dict(app.tornado_settings, + with mock.patch.dict(app.users.settings, {'spawner_class': mocking.NeverSpawner}): yield @@ -155,7 +155,7 @@ def never_spawn(app): @fixture def bad_spawn(app): """Fixture enabling BadSpawner""" - with mock.patch.dict(app.tornado_settings, + with mock.patch.dict(app.users.settings, {'spawner_class': mocking.BadSpawner}): yield @@ -163,7 +163,7 @@ def bad_spawn(app): @fixture def slow_bad_spawn(app): """Fixture enabling SlowBadSpawner""" - with mock.patch.dict(app.tornado_settings, + with mock.patch.dict(app.users.settings, {'spawner_class': mocking.SlowBadSpawner}): yield @@ -171,6 +171,6 @@ def slow_bad_spawn(app): @fixture def admin_access(app): """Grant admin-access with this fixture""" - with mock.patch.dict(app.tornado_settings, + with mock.patch.dict(app.users.settings, {'admin_access': True}): yield