Skip to content

Add ErrorResponse and Reorganize Test Suite - #14

Merged
ahcodedev merged 3 commits into
mainfrom
prices-api-products
Nov 10, 2026
Merged

ahcodedev merged 3 commits into
mainfrom
prices-api-products

Conversation

@ahcodedev

@ahcodedev ahcodedev commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds an ErrorResponse model and uses it when parsing API errors. Also reorganizes the test suite: client tests are split by API area, and shared test data and helpers are moved into tests/mocks/.

Error handling

  • New ErrorResponse model (status, error_message) in responses.py, exported from pypricecharting.

Test restructure

  • Client tests are split into three files per client:
    • test_pricecharting.py / test_asyncpricecharting.py: construction, closing, and the context manager
    • test_pricecharting_prices.py / test_asyncpricecharting_prices.py: product and products
    • test_pricecharting_marketplace.py / test_asyncpricecharting_marketplace.py: the offer* methods
  • All JSON test data now lives in tests/mocks/json.py, grouped into Models, Requests, and Responses:

Type of Change

feature: new public ErrorResponse model. Note the error detection change above.

Checklist

  • just lint passes
  • just test passes (173 tests, 100% coverage)
  • Tests added or updated for the change
  • Docs updated if needed (README.md, docs/, CLAUDE.md)
  • Release label added

@ahcodedev ahcodedev added feature New feature (minor version bump) enhancement Improvement to an existing feature (minor version bump) labels Nov 10, 2026
@ahcodedev ahcodedev changed the title Prices api products Add ErrorResponse and Reorganize Test Suite Nov 10, 2026
@ahcodedev
ahcodedev merged commit 2beaef6 into main Nov 10, 2026
14 checks passed
@ahcodedev
ahcodedev deleted the prices-api-products branch November 10, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to an existing feature (minor version bump) feature New feature (minor version bump)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant