Skip to content

Chore: split test_client.py (~2700 lines) into per-feature test modules #21

@justin-layerv

Description

@justin-layerv

Context

Flagged in PR #8 review (claude[bot] 2026-04-11):

test_client.py grew to ~2160 lines [now ~2700 after subsequent review rounds]. Consider splitting by feature area (e.g. test_batch.py, test_validation.py) in a follow-up for maintainability.

Suggested split

  • test_batch.py — batch_create tests (shape guards, 400 passthrough, 207, access_policy)
  • test_validation.py — client-side validation tests (tags, limit, max_sessions, URL scheme, prefix enforcement)
  • test_list.py — list/list_all tests (pagination, filters, date serialization)
  • test_errors.py — error parsing, detail fallback chain, RFC 7807
  • test_client.py — core CRUD tests, retry policy, auth masking, debug logging

Shared fixtures

The existing client and async_client fixtures would move to conftest.py (if not already there) so all test modules share them.

Not a blocker for PR #8

Reviewer explicitly labeled this "in a follow-up for maintainability."

Metadata

Metadata

Assignees

No one assigned

    Labels

    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