Skip to content

Commit

Permalink
Try using /users endpoint for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed May 4, 2024
1 parent c29c492 commit 4d2a167
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/tests_deployment/test_jupyterhub_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ def api_token():
@pytest.mark.filterwarnings("ignore::urllib3.exceptions.InsecureRequestWarning")
def test_jupyterhub_loads_roles_from_keycloak(api_token):
response = requests.get(
f"https://{constants.NEBARI_HOSTNAME}/hub/api/user/{constants.KEYCLOAK_USERNAME}",
f"https://{constants.NEBARI_HOSTNAME}/hub/api/users",
headers={"Authorization": f"Bearer {api_token}"},
verify=False,
)
user = response.json()
assert user["roles"] == []
users = response.json()
print(users)
assert users[0]["roles"] == []

0 comments on commit 4d2a167

Please sign in to comment.