Skip to content

Commit 2b1f5fe

Browse files
feat: add unit tests with mocked httpx (28 tests)
- Test request construction, response parsing, error handling - Mock httpx.Client.request instead of hitting real API - Test all endpoints: scrape, extract, search, crawl, monitor, history - Test HTTP errors (401, 402, 429), timeouts - Test camelCase serialization - Update CI to run test_client.py Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fc8bd04 commit 2b1f5fe

3 files changed

Lines changed: 416 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
- uses: actions/checkout@v4
2222
- uses: astral-sh/setup-uv@v3
2323
- run: uv sync --frozen
24-
- run: uv run pytest tests/ -v --ignore=tests/test_integration.py
24+
- run: uv run pytest tests/test_client.py -v

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v4
1212
- uses: astral-sh/setup-uv@v3
1313
- run: uv sync --frozen
14-
- run: uv run pytest tests/ -v --ignore=tests/test_integration.py
14+
- run: uv run pytest tests/test_client.py -v
1515

1616
publish:
1717
needs: test

0 commit comments

Comments
 (0)