mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-28 10:54:05 +00:00
[tests] Update API tests to use /api prefix
- Simplified api_client fixture to hardcode /api prefix - Updated websocket endpoint test to use /api/ws - Fixed internal endpoint tests to not use /api prefix - Enhanced validation.py to handle OpenAPI nullable syntax
This commit is contained in:
@@ -93,7 +93,8 @@ def api_client(base_url: str) -> Generator[Optional[requests.Session], None, Non
|
||||
|
||||
# Helper function to construct URLs
|
||||
def get_url(path: str) -> str:
|
||||
return urljoin(base_url, path)
|
||||
# All API endpoints use the /api prefix
|
||||
return urljoin(base_url, '/api' + path)
|
||||
|
||||
# Add url helper to the session
|
||||
session.get_url = get_url # type: ignore
|
||||
|
||||
Reference in New Issue
Block a user