Add link analysis tests and integration tests for /links/analyze endpoint

- Implemented `test_link_analysis` in `test_docker.py` to validate link analysis functionality.
- Created `test_link_analysis.py` with comprehensive tests for link analysis, including basic functionality, configuration options, error handling, performance, and edge cases.
- Added integration tests in `test_link_analysis_integration.py` to verify the /links/analyze endpoint, including health checks, authentication, and error handling.
This commit is contained in:
AHMET YILMAZ
2025-10-14 19:24:16 +08:00
parent 8cca9704eb
commit aebf5a3694
7 changed files with 1926 additions and 0 deletions

View File

@@ -240,3 +240,12 @@ class AdaptiveJobStatus(BaseModel):
metrics: Optional[Dict[str, Any]] = None
result: Optional[Dict[str, Any]] = None
error: Optional[str] = None
class LinkAnalysisRequest(BaseModel):
"""Request body for the /links/analyze endpoint."""
url: str = Field(..., description="URL to analyze for links")
config: Optional[Dict] = Field(
default_factory=dict,
description="Optional LinkPreviewConfig dictionary"
)