Skip to content

Issue 25: SDK Test Suite #25

@laraibg786

Description

@laraibg786

Goal

Create a comprehensive test suite for the Python SDK covering unit tests (parsing, error mapping, state machine) and integration tests (end-to-end workflows against the local API), with >90% coverage.

Requirements

Functional

  • Unit Tests (50+): Client initialization, retry logic, error mapping, state machine transitions, callback firing.
  • Integration Tests (20+ scenarios): Full activation flow, heartbeat loop, grace mode, revocation, offline simulation.
  • Fixtures: Mocked API responses, deterministic test data, offline simulation helpers.
  • Coverage: >90% line coverage enforced in CI.

Technical

  • Framework: pytest + pytest-asyncio + respx (for mocking httpx).
  • CI: Tests run in GitHub Actions on every push.
  • Markers: @pytest.mark.unit and @pytest.mark.integration.

Acceptance Criteria

  • All unit tests pass without a running API.
  • All integration tests pass against a local Docker Compose stack.
  • Coverage report shows >90%.
  • CI runs both suites on every push.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions