mock_jupyter#

rubin.nublado.client.mock_jupyter(respx_mock, base_url, user_dir, *, use_subdomains=False)#

Set up a mock JupyterHub and JupyterLab.

Parameters:
  • respx_mock (Router) – Mock router to use to install routes.

  • base_url (str) – Base URL for JupyterHub. If per-user subdomains are in use, the per-user subdomains will be created by prepending username. to the hostname of this URL.

  • user_dir (Path) – User directory for mocking /files responses.

  • use_subdomains (bool, default: False) – If set to True, use per-user subdomains for JupyterLab and a subdomain for JupyterHub. Requests to the URL outside of the subdomain will be redirected.

Return type:

MockJupyter