fixed default roles for mocked services

This commit is contained in:
IvanaH8
2020-12-16 11:17:43 +01:00
parent 4cc2f0a363
commit 8a7320b318
3 changed files with 17 additions and 2 deletions

View File

@@ -44,6 +44,7 @@ import jupyterhub.services.service
from . import mocking
from .. import crypto
from .. import orm
from ..roles import mock_roles
from ..utils import random_port
from .mocking import MockHub
from .test_services import mockservice_cmd
@@ -245,6 +246,7 @@ def _mockservice(request, app, url=False):
):
app.services = [spec]
app.init_services()
mock_roles(app, name, 'services')
assert name in app._service_map
service = app._service_map[name]