-
Notifications
You must be signed in to change notification settings - Fork 17
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
Cleanup tests, add support for error and pending payment statuses #20
Commits on Oct 1, 2015
-
As I like to keep things simple, I removed one layer of inheritance. The test case was pretty useless, as it mostly served to set settings that we could set like any other Django setting already.
Configuration menu - View commit details
-
Copy full SHA for f690d4e - Browse repository at this point
Copy the full SHA f690d4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for fc9bfd3 - Browse repository at this point
Copy the full SHA fc9bfd3View commit details -
Move request tests to dedicated module
Conceptually, that's a totally different phase of the Adyen flow. As they're a bit noisy, I've moved them to their own module.
Configuration menu - View commit details
-
Copy full SHA for 979893c - Browse repository at this point
Copy the full SHA 979893cView commit details -
Move remaining tests into submodules
The response tests deserved their own module. And with that, the remaining tests were only testing payment notifications, so the previously catch-all 'test_adyen' module was renamed.
Configuration menu - View commit details
-
Copy full SHA for cc46c8e - Browse repository at this point
Copy the full SHA cc46c8eView commit details -
Reduce verbosity in responses tests
It was easy to make those tests a bit easier to read, so I did. Also removed a switch based on the Python version, because we only support Python 3 anyway.
3Configuration menu - View commit details
-
Copy full SHA for ec6192a - Browse repository at this point
Copy the full SHA ec6192aView commit details -
Use correct name for new tests
Woops, I called responses what are really redirects; the class is called PaymentRedirection after all.
Configuration menu - View commit details
-
Copy full SHA for 6bc937a - Browse repository at this point
Copy the full SHA 6bc937aView commit details -
It only added an unneeded level of redirection and was only used when being inherited from again by FormRequest. It might make sense to factor it out later when adding another request class, but as it stands, it just makes things harder to understand.
Configuration menu - View commit details
-
Copy full SHA for 237f2aa - Browse repository at this point
Copy the full SHA 237f2aaView commit details -
This commit moves some duplicate attributes to the common BaseInteraction and removes one level of inheritance between PaymentFormRequest and BaseInteraction.
Configuration menu - View commit details
-
Copy full SHA for a46df55 - Browse repository at this point
Copy the full SHA a46df55View commit details -
This commit * switches to using a MockRequest class instead of passing around weird state on self * moves one-time-only data into the individual tests * creates a dedicated module for unit tests * uses py.test syntax and Django foo to make tests more readable
Configuration menu - View commit details
-
Copy full SHA for f89cfa3 - Browse repository at this point
Copy the full SHA f89cfa3View commit details -
Safeguard against _compute_hash returning None
I was bothered by params.get(self.HASH_FIELD) because I'd expect the hash field to always be present. But I realized it's better to allow it not being present, but loudly raising an InvalidTransactionException, irrespective whehter self.hash() returns anything or not (which it might not do accidentally). This is probably minor nitpicking, but better be safe than sorry!
Configuration menu - View commit details
-
Copy full SHA for 419aaf4 - Browse repository at this point
Copy the full SHA 419aaf4View commit details -
Handle ERROR notifications from Adyen
The point of this PR really is to address a bug with ERROR notifications from Adyen. Oscaro employees can check Sentry: http://sentry-prod.oscaro.com/oshop/oshop-prod/group/1310/events/3457809/ The bug is two-fold. Error messages were forgotten in the status map. Note that PAYMENT_RESULT_ERROR is already present in the codebase. The other issue was that the lookup in ADYEN_TO_COMMON_STATUSES was implemented to be forgiving (using get()). Hence the traceback above is somewhat subtle; it lead to status being returned as None.
Configuration menu - View commit details
-
Copy full SHA for 4df53e2 - Browse repository at this point
Copy the full SHA 4df53e2View commit details
Commits on Oct 7, 2015
-
Handle PENDING notifications from Adyen
As documented, Adyen may return a payment status of pending. This commit adds support of it. As the job of django-oscar-adyen is merely to bubble that data up to the Scaffold, the change is pretty simple.
Configuration menu - View commit details
-
Copy full SHA for e65f05e - Browse repository at this point
Copy the full SHA e65f05eView commit details -
This PR improved upon the tests, but there's always work left to do. This commits adds a few of my ramblings about how we could improve further.
Configuration menu - View commit details
-
Copy full SHA for 76a1b31 - Browse repository at this point
Copy the full SHA 76a1b31View commit details