Format: Apply code and markdown formatting fixes
This commit is contained in:
parent
6e9087d0f4
commit
ddff43595f
@ -134,11 +134,11 @@ All series-related WebSocket events include `key` as the primary identifier in t
|
|||||||
|
|
||||||
### AnimeSeries Identifier Fields
|
### AnimeSeries Identifier Fields
|
||||||
|
|
||||||
| Field | Type | Purpose |
|
| Field | Type | Purpose |
|
||||||
| ------ | ----------- | ------------------------------------------------- |
|
| -------- | --------------- | ------------------------------------------------- |
|
||||||
| `id` | Primary Key | Internal database key for relationships |
|
| `id` | Primary Key | Internal database key for relationships |
|
||||||
| `key` | Unique, Indexed | **PRIMARY IDENTIFIER** for all lookups |
|
| `key` | Unique, Indexed | **PRIMARY IDENTIFIER** for all lookups |
|
||||||
| `folder` | String | Filesystem metadata only (not for identification) |
|
| `folder` | String | Filesystem metadata only (not for identification) |
|
||||||
|
|
||||||
**Database Service Methods:**
|
**Database Service Methods:**
|
||||||
|
|
||||||
|
|||||||
@ -196,12 +196,13 @@ conda run -n AniWorld python -m pytest tests/ -v
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Completion Notes:**
|
**Completion Notes:**
|
||||||
- Updated `FakeSerie` and `FakeSeriesApp` in `test_anime_endpoints.py` with realistic keys
|
|
||||||
- Updated fixtures in `test_websocket_integration.py` (6+ fixtures)
|
- Updated `FakeSerie` and `FakeSeriesApp` in `test_anime_endpoints.py` with realistic keys
|
||||||
- Updated fixtures in `test_download_progress_integration.py` (5 fixtures)
|
- Updated fixtures in `test_websocket_integration.py` (6+ fixtures)
|
||||||
- Updated fixtures in `test_download_progress_websocket.py` (9 fixtures)
|
- Updated fixtures in `test_download_progress_integration.py` (5 fixtures)
|
||||||
- Updated fixtures in `test_download_models.py` (10+ fixtures)
|
- Updated fixtures in `test_download_progress_websocket.py` (9 fixtures)
|
||||||
- All fixtures now use URL-safe, lowercase, hyphenated key format
|
- Updated fixtures in `test_download_models.py` (10+ fixtures)
|
||||||
|
- All fixtures now use URL-safe, lowercase, hyphenated key format
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -230,13 +231,14 @@ conda run -n AniWorld python -m pytest tests/ -v
|
|||||||
- [x] All integration tests pass (10 tests)
|
- [x] All integration tests pass (10 tests)
|
||||||
|
|
||||||
**Completion Notes:**
|
**Completion Notes:**
|
||||||
- Created comprehensive test file with 10 tests:
|
|
||||||
- `TestAPIIdentifierConsistency`: 2 tests for API response validation
|
- Created comprehensive test file with 10 tests:
|
||||||
- `TestServiceIdentifierConsistency`: 2 tests for download service key usage
|
- `TestAPIIdentifierConsistency`: 2 tests for API response validation
|
||||||
- `TestWebSocketIdentifierConsistency`: 2 tests for WebSocket events
|
- `TestServiceIdentifierConsistency`: 2 tests for download service key usage
|
||||||
- `TestIdentifierValidation`: 2 tests for model validation
|
- `TestWebSocketIdentifierConsistency`: 2 tests for WebSocket events
|
||||||
- `TestEndToEndIdentifierFlow`: 2 tests for full flow verification
|
- `TestIdentifierValidation`: 2 tests for model validation
|
||||||
- Tests use UUID suffixes for isolation to prevent state leakage
|
- `TestEndToEndIdentifierFlow`: 2 tests for full flow verification
|
||||||
|
- Tests use UUID suffixes for isolation to prevent state leakage
|
||||||
|
|
||||||
**Test Command:**
|
**Test Command:**
|
||||||
|
|
||||||
|
|||||||
@ -153,6 +153,7 @@ class TestAPIIdentifierConsistency:
|
|||||||
- Both fields are present and distinct
|
- Both fields are present and distinct
|
||||||
"""
|
"""
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
# Add an item first with unique key
|
# Add an item first with unique key
|
||||||
unique_suffix = str(uuid.uuid4())[:8]
|
unique_suffix = str(uuid.uuid4())[:8]
|
||||||
unique_key = f"one-piece-{unique_suffix}"
|
unique_key = f"one-piece-{unique_suffix}"
|
||||||
@ -319,7 +320,7 @@ class TestServiceIdentifierConsistency:
|
|||||||
- Data can be restored with correct identifiers
|
- Data can be restored with correct identifiers
|
||||||
"""
|
"""
|
||||||
import json
|
import json
|
||||||
|
|
||||||
# Add item to queue
|
# Add item to queue
|
||||||
await download_service.add_to_queue(
|
await download_service.add_to_queue(
|
||||||
serie_id="jujutsu-kaisen",
|
serie_id="jujutsu-kaisen",
|
||||||
@ -470,6 +471,7 @@ class TestEndToEndIdentifierFlow:
|
|||||||
- All responses contain correct identifiers
|
- All responses contain correct identifiers
|
||||||
"""
|
"""
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
# Use unique key to avoid conflicts with other tests
|
# Use unique key to avoid conflicts with other tests
|
||||||
unique_suffix = str(uuid.uuid4())[:8]
|
unique_suffix = str(uuid.uuid4())[:8]
|
||||||
unique_key = f"bleach-tybw-{unique_suffix}"
|
unique_key = f"bleach-tybw-{unique_suffix}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user