From 671a7b1b02503cfa5c9aecd40c27a0c2729a285b Mon Sep 17 00:00:00 2001 From: stuppie Date: Wed, 4 Nov 2026 12:11:03 -0600 Subject: strip out AMT --- tests/http/test_auth.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tests/http/test_auth.py') diff --git a/tests/http/test_auth.py b/tests/http/test_auth.py index b44a36a..40f0366 100644 --- a/tests/http/test_auth.py +++ b/tests/http/test_auth.py @@ -1,4 +1,5 @@ from urllib.parse import parse_qs, urlparse +from uuid import uuid4 import pytest from httpx import AsyncClient @@ -35,9 +36,6 @@ class FakeGRApiManager: return user -@pytest.fixture -def email() -> str: - return "unittest@generalresearch.com" @pytest.fixture @@ -58,20 +56,20 @@ class TestAuth: ): client = httpxclient - res = await client.post("/auth/magic-link/request", json={"email": email}) + res = await client.post("/auth/magic-link/request/", json={"email": email}) d = res.json() assert res.status_code == 200 assert d["magic_link"] token = parse_qs(urlparse(d["magic_link"]).query)["token"][0] - url = "/auth/magic-link/exchange" + url = "/auth/magic-link/exchange/" body = {"token": token} res = await client.post(url, json=body) assert res.status_code == 204 assert client.cookies.get(SESSION_COOKIE_NAME) - res = await client.get("/auth/session") + res = await client.get("/auth/session/") assert res.status_code == 200 assert res.json()["email"] == email @@ -87,7 +85,7 @@ class TestAuth: fake_gr_api_manager.add_amt_user(amt_worker_id) res = await client.post( - "/auth/link-amt/request", + "/auth/link-amt/request/", json={"email": email, "amt_worker_id": amt_worker_id}, ) d = res.json() @@ -110,7 +108,7 @@ class TestAuth: assert transitioned_amt_worker_id == amt_worker_id assert amt_worker_id not in fake_gr_api_manager.amt_worker_ids - res = await client.get("/auth/session") + res = await client.get("/auth/session/") assert res.status_code == 200 assert res.json()["email"] == email -- cgit v1.2.3