Skip to content

Integration tests call kwargs removed by #117 (updates sort, premium filters, token_include/exclude) #118

Description

@martinkersner

Surfaced by Claude during /review of PR #117 (#117).

PR #117 removed dead/registry-absent kwargs from FundingRate.latest, CexToken.updates, CexSymbol.volume/cautions/delistings, and Premium.__call__. The mocked/offline tests were updated, but tests/test_integration.py (marker integration, only run with a live API key) still calls several of the now-removed kwargs and will raise TypeError at call time:

  • tests/test_integration.py:433 updates(sort="asc", limit=10)
  • tests/test_integration.py:439 updates(sort="desc", limit=10)
  • tests/test_integration.py:686 premium(min_pdp="1", ...)
  • tests/test_integration.py:691 premium(max_pdp="10", ...)
  • tests/test_integration.py:696 premium(min_pdp="1", max_pdp="10", ...)
  • tests/test_integration.py:701 premium(min_pdp24h=..., max_pdp24h=...)
  • tests/test_integration.py:711 premium(min_net_funding_rate="-0.01", ...)
  • tests/test_integration.py:732 premium(token_include="bitcoin", ...)
  • tests/test_integration.py:749 premium(token_exclude="SHIB", ...)

These do not affect CI (CI runs -m "not integration"), so the offline suite stays green; they break only when the integration suite is run against the live backend.

Open decision (needs maintainer)

token_include / token_exclude are, per project memory, real working premium backend params (they accept full names like bitcoin, not tickers). They are simply absent from the codegen'd datamaxi/_endpoints.py registry. #117 dropped them as "dead" because request_endpoint rejects registry-absent params — but if the backend genuinely supports them, the SDK has lost a working feature and the fix belongs upstream (add them to the OpenAPI spec so codegen re-emits them into the registry), not by deleting the params. The sort/min_pdp/min_net_funding_rate etc. filters may be genuinely dead (silently ignored) and their integration cases can just be removed.

Done when

  • Each broken tests/test_integration.py case is either removed (genuinely-dead params) or restored after the param is reinstated via the registry (params the backend really supports).
  • token_include/token_exclude registry gap reconciled: confirm whether backend supports them and, if so, add to the upstream OpenAPI spec / registry; otherwise document them as dropped.
  • Integration suite runs without TypeError from removed kwargs.

Metadata

Metadata

Assignees

Labels

claude-foundSurfaced by ClaudereviewAuto-detected by Claude during /review

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions