Michael van Tellingen
711ec4f97e
Add unittest for atomic stock allocation
9 years ago
Michael van Tellingen
8fb5ce932b
Fix a race condition when using single-usage vouchers
The initial check if the voucher is available was done before creating
the order. This change adds a validation step during the order creation
within an atomic() block.
See #2101
9 years ago
Alexander Gaevsky
8b19afc746
Create `PaymentEventQuantity` for all payment events as well as for all order lines.
8 years ago
Alexander Gaevsky
fdea437377
Slightly refactor currency formatting in order to support multiple currencies.
8 years ago
Alexander Gaevsky
3e4dda9a89
Check if stockrecord price is set when determining pricing policy in the `FixedRateTax` and `DeferredTax` pricing strategy mixins.
8 years ago
Alexander Gaevsky
ad1094c1e8
Check if unit price available before calculating basket line prices.
8 years ago
Alexander Gaevsky
4880a06f2a
Fallback to None when passing request to order creator, add tests for site determination using request in the order creator.
9 years ago
Michael van Tellingen
1de46cbd48
Run the tests by default with postgresql
Most real-world instances will use postgresql instead of sqlite so it's
better to use postgres for the tests. This also allows us to easily add
tests for concurrency issues which is not supported by sqlite
9 years ago
Alexander Gaevsky
896785163c
Add tests for order and order line status change signals.
9 years ago
Alexander Gaevsky
a2c5e952a2
Add test for TW 3 and 5-digit postcodes.
9 years ago
Alexander Gaevsky
a96079eb01
Add test for user search in dashboard when user name contains from more than 2 parts.
9 years ago
Alexander Gaevsky
82d9e7d264
Make product unavailable if price is empty to avoid exception when adding product without price to basket
10 years ago
Alexander Gaevsky
70386911ec
Fix flake8 warnings.
9 years ago
Alexander Gaevsky
a54a48489a
Add test for recommended products ordering.
9 years ago
Alexander Gaevsky
3851321ff8
Add fallback for loading formset classes from old destination for backward compatibility, show deprecation warning, add tests.
9 years ago
Alexander Gaevsky
938821987f
Move formset classes to separate modules to make it easier to override them
10 years ago
Clinton Blackburn
6749361a81
Fixed string formatting bug in VoucherRemoveView
The pk kwarg on views is a string type. The message format string was expecting a numeric value. This updates that format string to expect a string value, which will always display correctly.
9 years ago
Samir Shah
8f7c603d25
Add tests for OSCAR_REQUIRED_ADDRESS_FIELDS setting.
9 years ago
Alexander Gaevsky
96208ec52e
Add test for address book update on shipping or billing address creation.
10 years ago
Alexander Gaevsky
0bddb73a71
Syntax improvements, sort imports with isort.
9 years ago
Alexander Gaevsky
5de4cfd6cc
Extract cookies from TestApp instance, instead of Client instance. Make sure extracted basket cookie value is unquoted in the tests.
9 years ago
Michael van Tellingen
be8a2795c7
Rename test file to match module tested.
As in `test_model.py` -> `test_models.py`
9 years ago
Michael van Tellingen
0ebe344a27
Merge tests.integration with tests.unit
The idea of splitting integration from unittests is good in theory
but leads to a lot of mental overhead. Besides whenever a tests
interacts with a database it isn't a unittest anyway.
9 years ago
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 years ago
Michael van Tellingen
fa8aca9818
Remove oscar.core.utils.compose
9 years ago
Michael van Tellingen
c26642732b
Remove the oscar.test.decorators module
9 years ago
Michael van Tellingen
9e3ad83122
Remove deprecated Product.min_child_price_*_tax
9 years ago
Michael van Tellingen
8266000b8e
Use the django-phonenumber-field module instead of our own
9 years ago
Alexander Gaevsky
b75153ad49
Add tests for CheckoutSessionMixin.check_basket_is_valid method.
9 years ago
Alexander Gaevsky
8fa4e093b3
Make value field mandatory for percentage discount benefit.
9 years ago
Michael van Tellingen
c06483f5ab
Fix customisation tests by going full pytest
The tests were failing on python 2 due to the fact that the __init__.py
wasn't written so it wasn't a valid module. With this commit we now
also fully leverage pytest functionality to handle temporary paths for
us.
9 years ago
Michael van Tellingen
1f286587a4
isort on tests/
9 years ago
Alexander Gaevsky
0425036905
Add test to verify that base dashboard app config inherited properly.
9 years ago
Alexander Gaevsky
757220ce09
Remove Django Test Client usages in favor of WebTestCase.
9 years ago
Michael van Tellingen
534d1a6b97
Remove no-op SessionAuthenticationMiddleware from tests.settings
9 years ago
Michael van Tellingen
caba5037c0
Open files with the context manager to close them properly
9 years ago
Michael van Tellingen
89e18dcb31
include() is no longer needed for Application.urls()
This fixes a DeprecationWarning
9 years ago
Michael van Tellingen
c6db096e80
UnitTest.assertEqual instead of .assertEquals()
Latter one is deprecated
9 years ago
Michael van Tellingen
9d8190869b
Use settings.MIDDLEWARE for Django > 1.10
9 years ago
Michael van Tellingen
db33f8f158
Fix Python 3 issue with the Offer reports
A dict_values object was returned instead of a list. See #2223
9 years ago
Michael van Tellingen
f34ee23785
Remove deprecated egg template loader from test settings
9 years ago
Michael van Tellingen
1ba28fda59
Fix tests
9 years ago
Michael van Tellingen
3c2444d5b4
Update migrations to set on_delete=CASCADE on foreignkeys
9 years ago
Michael van Tellingen
aafcc8a901
flake8
9 years ago
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 years ago
Zachary B. Mott
ee3e907a1b
#2112. Fix postal code validator for Brunei Darussalam.
9 years ago
Alexander Gaevsky
6169826571
Show warning message if there is more than one product stock record has same SKU during product range edit in the dashboard.
9 years ago
Alexander Gaevsky
26ab156541
Add test for product attribute update through the product edit page in the dashboard.
9 years ago
Alexander Gaevsky
264ea574b3
Fix re-add of removed product from product range.
9 years ago
Alexander Gaevsky
5ef5570873
Fix dashboard report form when date range is incomplete, add tests.
9 years ago