Skip to content

Fix duplicated-code quality gate and document custom headers - #147

Merged
bltravis merged 2 commits into
masterfrom
fix-test-duplication-and-docs
Sep 18, 2026
Merged

bltravis merged 2 commits into
masterfrom
fix-test-duplication-and-docs

Conversation

@btravisebsco

Copy link
Copy Markdown

Summary

Test plan

  • uv run python -m pytest tests/ -q — 284 passed
  • uv run ruff check tests/test_folio_client.py — no new issues in the refactored range
  • uv run sphinx-build -b html docs docs/_build/html_check -q — docs build clean

SonarCloud's quality gate failed PR #146 on new-code duplication
(24.6%, threshold 3%), isolated to tests/test_folio_client.py
(32% new-code duplication). Extract shared helpers for the mock
httpx client setup and the paginated folio_get fake, reused across
all 13 tests in TestCustomHeaders.
Add usage examples for the per-request headers kwarg added to the
folio_* methods, using the mod-custom-fields x-okapi-module-id
requirement as the motivating example.
@sonarqubecloud

Copy link
Copy Markdown

@bltravis
bltravis merged commit 93ec7f3 into master Sep 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants