Skip to content

BTI-841: Full test suite with 100% coverage and SDK correctness fixes#4

Merged
vildanbina merged 23 commits into
developfrom
testsuite
Apr 22, 2026
Merged

BTI-841: Full test suite with 100% coverage and SDK correctness fixes#4
vildanbina merged 23 commits into
developfrom
testsuite

Conversation

@vildanbina
Copy link
Copy Markdown
Collaborator

@vildanbina vildanbina commented Apr 21, 2026

  • Comprehensive test suite: 2087 tests at 100% line+branch coverage built across 9 phases, runtime ~3s.
  • Shared test helpers: Helpers class (renamed from TestHelpers to dodge pytest collection), standard_payload, populate_required_fields, and assertion helpers verifying wire-level Action via RecordingMock.
  • SDK correctness: cancel() now sends Action=Cancel (was silently Pay); ParameterValidationError grammar fixed; IdealQrBuilder + BuckarooError forward-refs resolved; refund/cancelAuthorize drop unreachable AmountDebit-guard branches.
  • Security/logging: BuckarooLoggingObserver masks the Value sibling of any sensitive parameter Name (cvc, bic, pan, iban, encryptedcarddata, etc.).
  • Additions: BuckarooStatusCode enum exported from buckaroo.models; confirm_credential() on BuckarooClient; cancelAuthorize, authorizeWithToken, payWithToken capability methods; externalpayment registry key lowercased.
  • Breaking changes: http.client.post() raises BuckarooApiError on any non-2xx; refund() reads original_transaction_key (snake_case) from payload, not camelCase; get_redirect_url() prefers required_action.redirect_url over self.redirect_url.
  • CI + packaging: ruff lint + format gates block CI; concurrency group prevents duplicate PR runs; python_requires >= 3.9; CHANGELOG added; LF enforced via .gitattributes.

raise BuckarooApiError on non-2xx + malformed JSON; restore single
exception hierarchy. expand observer masking set with cvc/bic/pan/
expirydate/encryptedcarddata. cover BuckarooHttpClient, BuckarooResponse,
BuckarooLoggingObserver, ContextualLoggingObserver, factories at 100%.
Fix misnamed tests, remove duplicates, add missing assertions,
merge KlarnaKP dead code, mark known bugs as xfail, fix Klarna
copy-paste, add refund/cancel/403 coverage, fix style inconsistencies.
1744 passed, 0 skipped, 0 failures, 100% coverage.
- Lowercase externalPayment registry key so create_builder() finds it
- Handle timeout=None in requests strategy error message
- Mask Values paired with sensitive Names in Buckaroo Parameters lists
@vildanbina vildanbina changed the title Full test suite with 100% coverage and SDK correctness fixes BTI-841: Full test suite with 100% coverage and SDK correctness fixes Apr 21, 2026
@vildanbina vildanbina requested a review from buckaroo-shu April 21, 2026 07:58
@vildanbina vildanbina merged commit e95aa33 into develop Apr 22, 2026
7 checks passed
@vildanbina vildanbina deleted the testsuite branch April 22, 2026 07:32
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