[ING-30] test: Cover currency filter on list endpoints#397
Draft
aquinofb wants to merge 1 commit into
Draft
Conversation
## Context The lago-api backend exposes a `currency` query parameter on the subscriptions, wallets, and payment_requests list endpoints (PR #5249). The Python client forwards arbitrary options as query params via find_all, so no source change is needed, but the behavior was untested. ## Description Add a find_all forwarding test for the `currency` option to the subscription, wallet, and payment_request client tests. Each stubs the request with the currency query string, so the test fails if the option is not forwarded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The lago-api backend exposes an optional
currencyquery parameter on the subscriptions, wallets, and payment_requests list endpoints (getlago/lago-api#5249). The Python client'sfind_all(options)already forwards arbitrary options as query parameters, so no source change is required, but the behavior was untested.Description
Adds a
find_alltest with{"currency": "EUR"}to the subscription, wallet, and payment_request client tests. Each registers an httpx mock keyed on thecurrencyquery string, so the test fails (pytest-httpx flags the unmatched request) if the option is not forwarded.How to try locally