ayub-khan
cceba2912a
issue-id=2843
Add functionality to check if a voucher is
available for a basket or not.
7 лет назад
Paul J Stevens
f7971ccd5c
Feature/voucher sets (#2384)
Add support for managing large amounts of vouchers grouped in sets.
7 лет назад
Michael van Tellingen
be8a2795c7
Rename test file to match module tested.
As in `test_model.py` -> `test_models.py`
9 лет назад
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 лет назад
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
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
8c32aaf3d9
Replace last occurences of django-dynamic-fixture with factory-boy
10 лет назад
Jonas Borges
1d650a104b
Correctly check for voucher availability in Applicator.get_basket_offers()
Applicator.get_basket_offers() checks for applicable basket offers using
something like if voucher.is_available_to_user(user) (see
https://github.com/django-oscar/django-oscar/blob/master/src/oscar/apps/offer/utils.py#L99 ).
However, the return value of is_available_to_user() is a 2-tuple, so
this will always evaluate to True.
Closes #1647
11 лет назад
Maik Hoepfel
ac31bb11d0
Remove leftover naive datetimes in tests
Oddly enough, the warnings were only thrown under Python 2.6. Should
investigate!
11 лет назад
Maik Hoepfel
a75a370c00
Update tests for new fields and correct timezone handling
Using timezone.now() will return naive datetimes if USE_TZ is not
enabled, which is what we want.
Resolves errors of comparing naive datetimes with aware datetimes.
12 лет назад
Xavier Ordoquy
73ae26b673
Python3 doesn’t like integers prefixed by 0.
12 лет назад
chenull
4289f882b5
Support Django's 1.5 AUTH_USER_MODEL feature
13 лет назад
David Winterbottom
02b3644e3c
Fix validation error in dashboard voucher form
The clean method was raising a KeyError when the date fields were empty.
12 лет назад
David Winterbottom
ce0cef6033
Split voucher testcase for better coherence
13 лет назад
David Winterbottom
2781b895f6
Trim fat from testcase
Use global instead of per-method test dates.
13 лет назад
David Winterbottom
dd7b661e20
Vouchers are now active ON their end date
13 лет назад
David Winterbottom
af830b1fa6
Allow count-based availability for offers
Required several schema changes:
* Add num_applications to offer model to track number of times an offer
has been applied within an order.
* Add max_global_applications to offer model to set a limit on how many times an offer
can be used.
* Add frequency to order discount to provide insight into how many times
an offer was applied for a particular order.
Structure of dashboard changes to talk about offer 'availability'
instead of assuming a start- and end-date.
13 лет назад
David Winterbottom
0d284ec0d8
Fixed issue with voucher discounts not being recorded.
Also added tests for vouchers
13 лет назад
David Winterbottom
afabcf32bb
Added new test deps to requirements file.
Plus tweaks to test method names
13 лет назад
David Winterbottom
feb8c9a327
Moved tests into separate package.
Also split them into unit and functional tests.
13 лет назад
David Winterbottom
d56f34f5f8
Now including the new voucher app
14 лет назад