mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-12 04:22:58 +00:00
Run tests on all children images
This commit is contained in:
17
tests/base-notebook/test_notebook.py
Normal file
17
tests/base-notebook/test_notebook.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
|
||||
import requests
|
||||
from conftest import TrackedContainer, find_free_port
|
||||
|
||||
|
||||
def test_secured_server(
|
||||
container: TrackedContainer, http_client: requests.Session
|
||||
) -> None:
|
||||
"""Notebook server should eventually request user login."""
|
||||
host_port = find_free_port()
|
||||
container.run_detached(ports={"8888/tcp": host_port})
|
||||
resp = http_client.get(f"http://localhost:{host_port}")
|
||||
resp.raise_for_status()
|
||||
assert "login_submit" in resp.text, "User login not requested"
|
Reference in New Issue
Block a user