Fix migration 001 - add base table creation for mtgonline_users, mtgonline_decklist_files, and mtgonline_rooms
This commit is contained in:
@@ -16,7 +16,7 @@ class TestAuthentication:
|
||||
async def test_login_success(self, client: AsyncClient, test_user: User):
|
||||
"""Test successful login."""
|
||||
response = await client.post(
|
||||
"/api/v1/auth/login",
|
||||
"/auth/login",
|
||||
json={
|
||||
"username": "regular_test",
|
||||
"password": "testpassword123",
|
||||
@@ -32,7 +32,7 @@ class TestAuthentication:
|
||||
async def test_login_invalid_password(self, client: AsyncClient, test_user: User):
|
||||
"""Test login with invalid password."""
|
||||
response = await client.post(
|
||||
"/api/v1/auth/login",
|
||||
"/auth/login",
|
||||
json={
|
||||
"username": "regular_test",
|
||||
"password": "wrongpassword",
|
||||
@@ -45,7 +45,7 @@ class TestAuthentication:
|
||||
async def test_login_nonexistent_user(self, client: AsyncClient):
|
||||
"""Test login with non-existent user."""
|
||||
response = await client.post(
|
||||
"/api/v1/auth/login",
|
||||
"/auth/login",
|
||||
json={
|
||||
"username": "nonexistent",
|
||||
"password": "password123",
|
||||
@@ -58,7 +58,7 @@ class TestAuthentication:
|
||||
async def test_register_success(self, client: AsyncClient):
|
||||
"""Test successful user registration."""
|
||||
response = await client.post(
|
||||
"/api/v1/auth/register",
|
||||
"/auth/register",
|
||||
json={
|
||||
"username": "newuser",
|
||||
"password": "newpassword123",
|
||||
@@ -75,7 +75,7 @@ class TestAuthentication:
|
||||
async def test_register_duplicate_username(self, client: AsyncClient, test_user: User):
|
||||
"""Test registration with duplicate username."""
|
||||
response = await client.post(
|
||||
"/api/v1/auth/register",
|
||||
"/auth/register",
|
||||
json={
|
||||
"username": "regular_test", # Already exists
|
||||
"password": "newpassword123",
|
||||
@@ -89,7 +89,7 @@ class TestAuthentication:
|
||||
async def test_get_current_user(self, client: AsyncClient, regular_token: str):
|
||||
"""Test getting current user."""
|
||||
response = await client.get(
|
||||
"/api/v1/auth/me",
|
||||
"/auth/me",
|
||||
params={"token": regular_token},
|
||||
)
|
||||
assert response.status_code == 200
|
||||
@@ -103,7 +103,7 @@ class TestAuthentication:
|
||||
|
||||
# First login to get refresh token
|
||||
login_response = await client.post(
|
||||
"/api/v1/auth/login",
|
||||
"/auth/login",
|
||||
json={
|
||||
"username": "regular_test",
|
||||
"password": "testpassword123",
|
||||
@@ -113,7 +113,7 @@ class TestAuthentication:
|
||||
|
||||
# Refresh token
|
||||
response = await client.post(
|
||||
"/api/v1/auth/refresh",
|
||||
"/auth/refresh",
|
||||
json={
|
||||
"refresh_token": refresh_token,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user