fix(tests): resolve merge conflicts and fix code review issues in saved searches tests

- Resolve add/add conflict in tests/test_api_saved_searches.py by keeping the improved HEAD version
- Resolve content conflict in tests/test_api_advanced_filters.py by keeping HEAD (no CRUD tests)
- Remove no-op test_get_user_id_branches (was just 'pass')
- Remove unused 'from fastapi import Request' import (fixes Ruff F401)
- Fix duplicate 'session = {}' assignment in MockRequest (fixes Ruff F811)
This commit is contained in:
copilot-swe-agent[bot]
2026-03-23 16:15:47 +00:00
356 changed files with 139501 additions and 2253 deletions
-7
View File
@@ -308,11 +308,6 @@ class TestSavedSearchesCRUD:
response = client.put(f"/api/saved-searches/{search_id}", json=update_payload)
assert response.status_code == 422
def test_get_user_id_branches(self, client: TestClient, mocker):
"""Test _get_user_id branches with different mock users."""
# This will be tested indirectly by mocking get_current_user
pass
def test_update_saved_search_same_name(self, client: TestClient):
"""PUT /api/saved-searches/{id} with the same name does not trigger duplicate check error."""
# Create a search
@@ -328,11 +323,9 @@ class TestSavedSearchesCRUD:
def test_get_user_id_branches_real(self, client: TestClient):
from app.api.saved_searches import _get_user_id
from fastapi import Request
# We need a mock request
class MockRequest:
session = {}
session = {}
state = type('obj', (object,), {'user': None})