Skip to content

Recommendation subscriptions: dry-run round trip and update assertions - #119

Merged
kLOsk merged 1 commit into
kLOsk:mainfrom
xgp:test/recommendation-subscriptions-round-trip
Oct 28, 2026
Merged

kLOsk merged 1 commit into
kLOsk:mainfrom
xgp:test/recommendation-subscriptions-round-trip

Conversation

@xgp

@xgp xgp commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #118, covering the two non-blocking review notes. Tests only; no code changes.

  • TestDryRunRoundTrip: drafts a pause with draft_recommendation_subscriptions, then calls confirm_and_apply(dry_run=True) through the real validate-only path. The suite's offline stub is swapped for _execute_plan(..., validate_only=True) with a fake Ads client, the same way test_validate_only.py does it. It asserts:
    • DRY_RUN_SUCCESS with validated_calls: 1;
    • validate_only set on the request;
    • one operation that is an update of the planned resource name to PAUSED.
  • test_each_operation_updates_the_planned_resource: with two types, every operation is an update (checked through the proto oneof), and the resource names match the plan in order.

uv run pytest: all green locally.

Follow-up to kLOsk#118 (review notes): a test drafts a pause and runs confirm_and_apply(dry_run=True) through the real validate-only path, checking one validated call, validate_only on the request, and an update of the planned resource to PAUSED; another asserts every operation is an update on the planned resource name. Tests only.
@kLOsk
kLOsk merged commit a1e9b0b into kLOsk:main Oct 28, 2026
3 checks passed
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.

2 participants