Setup project, started outlining endpoints and tests.
This commit is contained in:
commit
ad61b3f83c
55 files changed
+5138
No files matched your search
@@ -0,0 +1,46 @@
|
||||
"""Tests to check that auth endpoints are wired up."""
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
|
||||
def test_post_auth_login_returns_200(client: TestClient) -> None:
|
||||
"""Verify POST /api/auth/login returns a successful response."""
|
||||
response = client.post("/api/auth/login")
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_post_auth_refresh_returns_200(client: TestClient) -> None:
|
||||
"""Verify POST /api/auth/refresh returns a successful response."""
|
||||
response = client.post("/api/auth/refresh")
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_post_auth_logout_returns_200(client: TestClient) -> None:
|
||||
"""Verify POST /api/auth/logout returns a successful response."""
|
||||
response = client.post("/api/auth/logout")
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_post_auth_invite_accept_returns_200(client: TestClient) -> None:
|
||||
"""Verify POST /api/auth/invite/accept returns a successful response."""
|
||||
response = client.post("/api/auth/invite/accept")
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_post_auth_password_reset_request_returns_200(client: TestClient) -> None:
|
||||
"""Verify POST /api/auth/password-reset/request returns a successful response."""
|
||||
response = client.post("/api/auth/password-reset/request")
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_post_auth_password_reset_confirm_returns_200(client: TestClient) -> None:
|
||||
"""Verify POST /api/auth/password-reset/confirm returns a successful response."""
|
||||
response = client.post("/api/auth/password-reset/confirm")
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
|
||||
def test_get_auth_self_returns_200(client: TestClient) -> None:
|
||||
"""Verify get /api/auth/{user_id} returns a successful response."""
|
||||
response = client.get("/api/auth/123")
|
||||
assert response.status_code == 200
|
||||
Reference in new issue
Block a user