Skip to content

Add live sync/async smoke tests for initial async endpoints #318

Description

@Mattsface

Parent: #297
Depends on: #303

Goal

Add a small live smoke-test suite that proves both the synchronous Mlb client and the new AsyncMlb client can reach the real MLB Stats API end to end for the initial async vertical slice.

These tests complement deterministic offline contract/parity coverage; they do not replace it.

Scope

Add minimal live smoke coverage for the three initial shared endpoints:

  • get_team
  • get_person
  • get_schedule

Create matching sync and async smoke tests so failures are easy to interpret:

  • sync passes + async fails -> likely async implementation regression
  • sync fails + async fails -> likely live API/environment/fixture assumption issue

Suggested organization:

tests/external_tests/
├── mlb/
│   └── test_mlb_smoke.py
└── async_mlb/
    └── test_async_mlb_smoke.py

Test philosophy

Keep assertions deliberately small and stable.

Examples:

  • get_team(133) returns a Team with id == 133
  • get_person(664034) returns a Person with id == 664034
  • get_schedule(date="2022-10-07") returns a Schedule with dates

Do not duplicate model-validation tests or broad endpoint suites here. Detailed model behavior belongs in deterministic tests and existing model coverage.

Avoid mutable assertions such as current team names, rosters, standings, or other values that can change independently of library correctness.

CI / execution boundary

These tests contact the real MLB API and therefore must remain separate from normal deterministic CI.

They may be run manually or as part of explicit release/live validation, but an MLB API outage should not make ordinary PR CI fail.

Acceptance criteria

  • Live Mlb.get_team smoke test exists
  • Live Mlb.get_person smoke test exists
  • Live Mlb.get_schedule smoke test exists
  • Matching live AsyncMlb smoke tests exist for all three endpoints
  • Sync and async tests use intentionally comparable inputs/assertions
  • Assertions are limited to stable end-to-end behavior rather than detailed model validation
  • Live tests remain separate from deterministic PR CI
  • Test documentation makes the purpose and execution boundary clear

Refs #297
Depends on #303

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions