Joseph Wayodi
6a04a96ee3
Check checkout-view skip conditions before pre conditions
4 år sedan
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 år sedan
Joseph Wayodi
d0796cdc2b
Fix checkout.ThankYouView.get_object to never raise DoesNotExist error
Also fix "is_anonymous" attribute value in WebTestCase subclass.
5 år sedan
Alexander Gaevsky
31c935cf1d
Change checkout thank you view to redirect to the homepage if order not found in the session. (#3506)
5 år sedan
Samir Shah
d5d5c9d6fc
Remove/rename several deprecated model fields from order and partner apps.
6 år sedan
Samir Shah
2f9b52f58f
Restore basket if order placement fails for any reason.
5 år sedan
Samir Shah
93e7e66c2b
Add support for Django 3, drop support for Django 1.11
6 år sedan
samitnuk
2af6753c67
Add a new Communication app that manages all of Oscar's communications.
8 år sedan
Samir Shah
3f67ce9b76
Apply isort fixes on the whole project.
6 år sedan
Aliaksei Urbanski
ed8f9f1206
Make OrderPlacementMixin more customizable (#2732)
Pass communication event type code to OrderPlacementMixin.get_message_context()
7 år sedan
Samir Shah
a7edc8ba2f
Drop mock in favour of unittest.mock
7 år sedan
Samir Shah
13e2ed127c
Remove all uses of six.
7 år sedan
Samir Shah
8560a90490
Replace calls to super(ClassName, self) with super().
7 år sedan
Samir Shah
ec3791c371
Remove py2-specific imports, tests and code branches.
7 år sedan
Samir Shah
8a3288da43
Drop support below Django 1.11
8 år sedan
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 år sedan
Michael van Tellingen
aafcc8a901
flake8
9 år sedan
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 år sedan
Michael van Tellingen
c030a13359
Fix failing unittests
9 år sedan
Michael van Tellingen
93d0fe8325
Add `clear_url_caches()` to reload_url_conf() in the functional test
10 år sedan
Michael van Tellingen
63d6547e98
Various import fixes which were removed in Django 1.9
10 år sedan
Alexander Gaevsky
d3b24ed908
Fix shipping method validation test due since now it's been done without redirection
10 år sedan
Michael van Tellingen
174d4dcd67
Consolidate `oscar.test.factories` imports in the test modules
10 år sedan
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 år sedan
Michael van Tellingen
14cf5f3703
PEP8 fixes
11 år sedan
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 år sedan
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 år sedan
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 år sedan
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 år sedan
David Winterbottom
f086672ed2
Correct guest checkout test assertion
11 år sedan
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 år sedan
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 år sedan
David Winterbottom
21d73a1a96
Rewrite checkout functional tests
We no longer use Django's test client.
12 år sedan
David Winterbottom
466765ed01
Checkout house-keeping
- Comment the session manager better.
- Clean up the functional checkout tests.
12 år sedan
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 år sedan
David Winterbottom
07da76956e
Add tests for checkout payment details view pre-conditions
12 år sedan
David Winterbottom
fe0b9ab02f
Add tests for checkout payment method view pre-conditions
12 år sedan
David Winterbottom
96c94ea8ad
Extract core events into mixin to clean up tests
12 år sedan
David Winterbottom
9f69bf3c6e
Add tests for checkout shipping methods view pre-conditions
12 år sedan
David Winterbottom
5dc3d81dde
Add tests for checkout shipping address view pre-conditions
12 år sedan