Skip to content

Commit 050539d

Browse files
committed
Update tests after pulling in bug fix
1 parent 093d78a commit 050539d

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

server/python/tests/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,23 @@ The test suite is organized into three categories:
5656
pytest tests/ -v
5757
```
5858

59-
**Expected output:** 68 passed, 1 skipped in ~5 seconds
59+
**Expected output:** 69 passed in ~5 seconds
6060

6161
### Run Only Unit Tests (Fast, No Database Required)
6262

6363
```bash
6464
pytest -m unit -v
6565
```
6666

67-
**Expected output:** 51 passed in ~1 second
67+
**Expected output:** 61 passed, 8 deselected in ~1 second
6868

6969
### Run Only Integration Tests (Requires Database)
7070

7171
```bash
7272
pytest -m integration -v
7373
```
7474

75-
**Expected output:** 7 passed, 1 skipped in ~4 seconds
75+
**Expected output:** 8 passed, 61 deselected in ~4 seconds
7676

7777
### Run Specific Test File
7878

server/python/tests/integration/test_movie_routes_integration.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,7 @@ async def test_batch_create_movies(self, client):
224224
# Create batch
225225
response = await client.post("/api/movies/batch", json=movies)
226226

227-
# Note: Due to a bug in the API (duplicate insert_many calls),
228-
# this may return 500. This is a known issue to be fixed.
229-
# For now, we'll accept either 201 (success) or 500 (bug)
230-
assert response.status_code in [201, 500]
231-
232-
if response.status_code == 500:
233-
# Skip the rest of the test if the bug occurs
234-
import pytest
235-
pytest.skip("Batch create failed due to known duplicate insert_many bug")
227+
assert response.status_code == 201
236228
data = response.json()
237229
assert data["success"] is True
238230

server/python/tests/test_movie_routes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,7 @@ async def test_create_movies_batch_success(self, mock_get_collection):
422422
# Assertions
423423
assert result.success is True
424424
assert result.data["insertedCount"] == 2
425-
# Note: The route handler has a bug where it calls insert_many twice
426-
# This test documents the current behavior
427-
assert mock_collection.insert_many.call_count == 2
425+
assert mock_collection.insert_many.call_count == 1
428426

429427
@patch('src.routers.movies.get_collection')
430428
async def test_create_movies_batch_empty_list(self, mock_get_collection):

0 commit comments

Comments
 (0)