From 79d20ecce88787f3b958859fa228cdc1a8bebb46 Mon Sep 17 00:00:00 2001 From: Tanya Date: Fri, 9 Jan 2026 12:52:51 -0500 Subject: [PATCH] fix: Update favorite endpoint path from /favorite to /toggle-favorite The actual API endpoint is /toggle-favorite, not /favorite. Update all test cases to use the correct endpoint path. --- tests/test_api_photos.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_api_photos.py b/tests/test_api_photos.py index 88c8f9d..715e200 100644 --- a/tests/test_api_photos.py +++ b/tests/test_api_photos.py @@ -230,7 +230,7 @@ class TestPhotoFavorites: ): """Verify adding favorite.""" response = test_client.post( - f"/api/v1/photos/{test_photo.id}/favorite", + f"/api/v1/photos/{test_photo.id}/toggle-favorite", headers=auth_headers, ) @@ -264,7 +264,7 @@ class TestPhotoFavorites: # Remove it response = test_client.post( - f"/api/v1/photos/{test_photo.id}/favorite", + f"/api/v1/photos/{test_photo.id}/toggle-favorite", headers=auth_headers, ) @@ -279,7 +279,7 @@ class TestPhotoFavorites: ): """Verify 401 without auth.""" response = test_client.post( - f"/api/v1/photos/{test_photo.id}/favorite", + f"/api/v1/photos/{test_photo.id}/toggle-favorite", ) assert response.status_code == 401 @@ -291,7 +291,7 @@ class TestPhotoFavorites: ): """Verify 404 for non-existent photo.""" response = test_client.post( - "/api/v1/photos/99999/favorite", + "/api/v1/photos/99999/toggle-favorite", headers=auth_headers, )