Joseph Wayodi
6a04a96ee3
Check checkout-view skip conditions before pre conditions
пре 4 година
Samir Shah
76aeb45bdb
Fixes for deprecations in Django 3.2:
- Replace use of deprecated `request.is_ajax()` with equivalent.
- Replace use of `imp.reload` with `importlib.reload`
пре 4 година
Joseph Wayodi
d0796cdc2b
Fix checkout.ThankYouView.get_object to never raise DoesNotExist error
Also fix "is_anonymous" attribute value in WebTestCase subclass.
пре 5 година
Alexander Gaevsky
31c935cf1d
Change checkout thank you view to redirect to the homepage if order not found in the session. (#3506)
пре 5 година
Samir Shah
d5d5c9d6fc
Remove/rename several deprecated model fields from order and partner apps.
пре 6 година
Samir Shah
2f9b52f58f
Restore basket if order placement fails for any reason.
пре 5 година
Samir Shah
93e7e66c2b
Add support for Django 3, drop support for Django 1.11
пре 6 година
samitnuk
2af6753c67
Add a new Communication app that manages all of Oscar's communications.
пре 8 година
Samir Shah
3f67ce9b76
Apply isort fixes on the whole project.
пре 6 година
Aliaksei Urbanski
ed8f9f1206
Make OrderPlacementMixin more customizable (#2732)
Pass communication event type code to OrderPlacementMixin.get_message_context()
пре 7 година
Samir Shah
a7edc8ba2f
Drop mock in favour of unittest.mock
пре 7 година
Samir Shah
13e2ed127c
Remove all uses of six.
пре 7 година
Samir Shah
8560a90490
Replace calls to super(ClassName, self) with super().
пре 7 година
Samir Shah
ec3791c371
Remove py2-specific imports, tests and code branches.
пре 7 година
Samir Shah
8a3288da43
Drop support below Django 1.11
пре 8 година
Michael van Tellingen
28ea962ab6
Rename all tests files from *_tests.py to test_*.py
Better to use filenames which are commonly used in the python word then
custom ones.
пре 9 година
Michael van Tellingen
aafcc8a901
flake8
пре 9 година
Pete Graham
d5d0c4059e
Modify assert technique so test passes
Future tasks is to dig into self.assertRedirectsTo wouldn't work with the test
as it stands
пре 9 година
Michael van Tellingen
c030a13359
Fix failing unittests
пре 9 година
Michael van Tellingen
93d0fe8325
Add `clear_url_caches()` to reload_url_conf() in the functional test
пре 10 година
Michael van Tellingen
63d6547e98
Various import fixes which were removed in Django 1.9
пре 10 година
Alexander Gaevsky
d3b24ed908
Fix shipping method validation test due since now it's been done without redirection
пре 10 година
Michael van Tellingen
174d4dcd67
Consolidate `oscar.test.factories` imports in the test modules
пре 10 година
Michael van Tellingen
6fad63a4d0
Split oscar.test.newfactories in multiple modules
Create a factory module per app and move them under the new
oscar.test.factories module.
пре 10 година
Michael van Tellingen
14cf5f3703
PEP8 fixes
пре 11 година
Marco Badan
0637b55bcd
Improve test coverage in checkout views
Adds new functional tests for ShippingAddressView, PaymentDetailsView
and ThankYouView.
It's the second part of #1645 .
Notes
* Adds a custom template to be able to test some functionalities of
PaymentDetailsView
* Adds an helper to the CheckoutMixin
пре 11 година
Marco Badan
a0ce8f22dc
Update and extend checkout tests
* Uses factory-boy factories
* Adds helpers to the CheckoutMixin helper
* Adds plenty of functional tests
* Adds HTML IDs to some forms to be able to easily reference them
from our tests
@maikhoepfel :
This commit is the squashed version of #1645 , but it
does not contain the template changes. The unused
ShippingAddressView code was already cherry-picked across in 549decb .
I also fixed some PEP8 issues.
пре 11 година
Maik Hoepfel
09f66c35ea
Remove duplicate assertRedirectsToUrlName test helper
We have two methods doing something very similiar, so I'm removing the
one with the worse name.
Thanks go to @itbabu for spotting it in
https://github.com/django-oscar/django-oscar/pull/1645#issuecomment-71896876
пре 11 година
David Winterbottom
2cb9231f23
Fix bug in checkout for buying digital goods
The previous skip condition for shipping bypassed the shipping method
view but this is required as it sets the shipping method code.
пре 11 година
David Winterbottom
f086672ed2
Correct guest checkout test assertion
пре 11 година
Maik Hoepfel
2f2ebe5ca3
Checkout: Skip payment if order total is zero
When ordering a basket of free products, or with vouchers giving 100%
discount, we should not collect payment details.
To achieve this, I've added a check to the CheckoutSessionMixin which
calculates the order total and decides whether payment is necessary.
The modified test failed because the OrderCalculator called by
check_payment_is_necessary accessed other properties on the shipping
method. We now just mock a valid shipping method, which still achieves
the aim of ensuring there's only one.
пре 11 година
David Winterbottom
478fa0adf5
Ensure HTML IDs use underscores not hyphens
A bit OCD, but I noticed that the checkout forms were an exception in
using a hyphen so I've cleaned up all IDs to use underscores.
пре 12 година
David Winterbottom
21d73a1a96
Rewrite checkout functional tests
We no longer use Django's test client.
пре 12 година
David Winterbottom
466765ed01
Checkout house-keeping
- Comment the session manager better.
- Clean up the functional checkout tests.
пре 12 година
David Winterbottom
f013cddd68
Remove can_basket_be_submitted method
It is now replaced with a checkout pre-condition that applies to every
checkout view. If someone's basket becomes invalid while they are in
checkout, then they will be redirected back to the basket page.
пре 12 година
David Winterbottom
07da76956e
Add tests for checkout payment details view pre-conditions
пре 12 година
David Winterbottom
fe0b9ab02f
Add tests for checkout payment method view pre-conditions
пре 12 година
David Winterbottom
96c94ea8ad
Extract core events into mixin to clean up tests
пре 12 година
David Winterbottom
9f69bf3c6e
Add tests for checkout shipping methods view pre-conditions
пре 12 година
David Winterbottom
5dc3d81dde
Add tests for checkout shipping address view pre-conditions
пре 12 година