Skip to content

Commit 7a2cdea

Browse files
eecavannanaglepuff
andauthored
Assert that the URL refers to a specific ORCID environment
Co-authored-by: Michael Nagler <mike.nagler@kitware.com>
1 parent a0b072a commit 7a2cdea

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/test_auth.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ def test_login(client: TestClient):
1414
)
1515

1616
assert resp.status_code == 302
17-
assert any(
18-
(
19-
resp.next.url.startswith("https://orcid.org/oauth/authorize"), # type: ignore
20-
resp.next.url.startswith("https://sandbox.orcid.org/oauth/authorize"), # type: ignore
21-
)
22-
)
17+
assert resp.next.url.startswith(settings.orcid_base_url), # type: ignore
2318

2419

2520
def test_current_user(client: TestClient, logged_in_user):

0 commit comments

Comments
 (0)