Repository navigation
test: drive payment tests through bwh_payments stubs - #228
Draft
harshtandiya wants to merge 3 commits into
Draft
harshtandiya wants to merge 3 commits into
harshtandiya wants to merge 3 commits into
Conversation
Covers checkout link, paid webhook, replay, return-page confirm, abandoned cart release, paid cart lock, pending sweep and refund Payment Entry. Only the gateway driver helpers know the transport fake, so the bwh_payments Razorpay refactor may change their bodies but never the tests. Commits are suppressed for the class: the Razorpay controller logs every call through create_request_log, which commits.
Only imports and the gateway driver helpers change; every test body is untouched, which is the parity check for the bwh_payments refactor.
bwh_payments dropped tests/fake_stripe.py; the swap is one for one and no assertion changes.
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.
What this changes
bwh_payments now selects in-memory stub gateways under tests (bwhtech/bwh_payments#13). This PR moves the commera tests onto those stubs:
test_razorpay_checkout.pyis new. It covers the Razorpay journey: checkout, paid webhook, webhook replay, return-page confirmation, abandoned-cart release, paid-cart lock, pending sweep, and refund Payment Entry. It was written and passing against the old bwh_payments code first.test_payment_hooks.pyreplacesFakeStripeClientwithStubStripeClient, one for one. No assertion changes.No application code changes.
Tests
79 unit and 687 integration tests pass, with 17 skipped.
Merge order
This needs bwhtech/bwh_payments#13. Merge that first, because this PR imports
bwh_payments.services.*.stub.