Skip to content

Separate Model Target implementation tests from the shared suite - #3756

Merged
adamtheturtle merged 1 commit into
mainfrom
separate-model-target-implementation-tests-20261013
Oct 13, 2026
Merged

adamtheturtle merged 1 commit into
mainfrom
separate-model-target-implementation-tests-20261013

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

The shared Model Target Web API directory still contains tests that instantiate MockVWS, invoke the Flask target manager directly, or inspect a core dataset object. Move those tests into the implementation-owned test areas before packaging the shared contract suite.

  • Move the in-memory OAuth2 edge-case module to requests_mock, and its target-manager deletion case to the existing Flask Model Target module.
  • Move the two tests that configure their own MockVWS processing/failure behavior into the existing Requests Model Target module.
  • Move the dataset status-field unit test into requests_mock/test_model_target.py. Every destination is covered by an existing CI directory partition.

The shared Model Target directory no longer imports MockVWS, Flask internals, or the concrete dataset model. Part of #3738 and #3737.

Validation:

  • Compare collection with an isolated copy of the committed baseline: the same 771 selected cases are collected. AST comparison confirms every original function body, helper, and decorator is preserved.
  • Python 3.15: 527 shared and implementation cases pass, with 244 real-backend cases skipped, synthetic credentials, and retries disabled.
  • A separate consumer loads only the remaining shared suite and supplies custom HTTP URLs and credential fixtures: 507 cases pass across both existing mock adapters, with 244 real-backend skips.
  • The complete shared Model Target directory and all four changed/new implementation test modules have 100% local statement and branch coverage.
  • Pre-commit and pre-push checks pass, including CI partition validation, Mypy, Pyright, public type completeness, Ty, Pyrefly, and check-manifest. Pylint passes on every changed Python file; git diff --check passes.

This moves tests within existing CI partitions. Source code, workflows, dependencies, real-service opt-ins, and coverage gates remain unchanged. Hosted full-suite verification will run on this PR.

This branch was successfully deployed

2 active deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant