Skip to content

Commit

Permalink
Clean up and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
0mar committed Sep 11, 2024
1 parent 4e48f28 commit 8517682
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_hub_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,4 @@ def test_to_auth_url(sandbox, client, asymmetric_auth):
# }
# token = token_for_code(code)
# assert isinstance(token, str)
# FIXME: The session seems to be empty, but only for this method. Don't understand why
# FIXME: The session seems to be empty, but only for the token_for_code method. Confusing
3 changes: 1 addition & 2 deletions tests/test_server_extension.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import subprocess
from urllib.parse import urlencode, unquote
import requests
import pytest
from conftest import wait_for_server, SandboxConfig
Expand Down Expand Up @@ -69,6 +68,7 @@ def public_client():


def test_login_handler(jupyter_server, sandbox, public_client):
"""I think this test can be splitted in three with some engineering. Perhaps useful, not sure"""
session = requests.Session()
# Try endpoint and get redirected to login
query = {"iss": f"{sandbox}/v/r4/fhir", "launch": public_client.get_launch_code()}
Expand All @@ -87,7 +87,6 @@ def test_login_handler(jupyter_server, sandbox, public_client):
# Internally, get redirected to provider-auth
response = request_api(auth_url, session=session, allow_redirects=False)
assert response.status_code == 302
auth_url = response.headers["Location"]
callback_url = response.headers["Location"]
assert callback_url.startswith(ext_url + callback_path)
assert "code=" in callback_url
Expand Down

0 comments on commit 8517682

Please sign in to comment.