-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split logic from Model, split address into billing, shipping, use functions instead prefixed fields #149
base: main
Are you sure you want to change the base?
Conversation
…s (allows much more freedom) and adjust all providers for the change use create_test_payment for tests, TestPayment is now a Mock use unittest mocks when python3
Codecov Report
@@ Coverage Diff @@
## master #149 +/- ##
==========================================
+ Coverage 79.13% 80.81% +1.68%
==========================================
Files 27 28 +1
Lines 1649 1757 +108
Branches 190 194 +4
==========================================
+ Hits 1305 1420 +115
+ Misses 245 237 -8
- Partials 99 100 +1
Continue to review full report at Codecov.
|
@WhyNotHugo How do you feel about updating this pr to the current codebase? We could use a JSONField to store the billing and shipping information separetely in the same payment object. |
the PR is 7 years old ;). 4 years older than my children. I reworked the PR in a spinoff I had no time to update for years. When I find time I can rework it |
hahaha, yes, maybe trying to pick it up from here. Hope everything is well. |
Instead of using prefixed address fields in Model, use functions to retrieve the data.
This way different data sources can be used and a fallback can be provided (BasePaymentWithAddress) in case only one address is available.
BasePayment is split in Logic and Model. This allows better tests with less rendundancy.
The resulting testmock is in testcommon (test_common would be executed)