diff --git a/requirements.txt b/requirements.txt index 97aac141..d087648c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ docker escapism jupyterhub>=1.0 -pytest-jupyterhub @ git+https://github.com/jupyterhub/pytest-jupyterhub.git@main \ No newline at end of file +pytest-jupyterhub @ git+https://github.com/jupyterhub/pytest-jupyterhub.git@main diff --git a/tests/conftest.py b/tests/conftest.py index 92cf6635..a54104ef 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -8,6 +8,7 @@ import jupyterhub import netifaces import pytest + # from pytest_jupyterhub.jupyterhub_spawners import hub_app # from pytest_jupyterhub.jupyterhub_spawners import hub_app from docker import from_env as docker_from_env @@ -17,7 +18,6 @@ from dockerspawner import DockerSpawner, SwarmSpawner, SystemUserSpawner - # import base jupyterhub fixtures # make Hub connectable from docker by default @@ -74,20 +74,16 @@ def app(jupyterhub_app): app.config.DockerSpawner.image = f"jupyterhub/singleuser:{tag}" return app """ - + @pytest.fixture async def app(hub_app): - config = { - "Dockerspawner": { - "prefix": "dockerspawner-test" - } - } + config = {"Dockerspawner": {"prefix": "dockerspawner-test"}} if len(jh_version_info) > 3 and jh_version_info[3]: tag = jupyterhub.__version__ config["Dockerspawner"]["image"] = f"jupyterhub/singleuser:{tag}" - + app = await hub_app(config=config) return app