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:
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user