David Winterbottom
352dcf9633
Assign strategy classes to baskets
Hmmm, this turned out to be a monster commit. This change allows the
basket to be able to correctly calculate prices including tax.
It also requires a whole load of test changes since all baskets now
require a strategy instance to be assigned.
12 years ago
David Winterbottom
c372e7d811
Relocate add_product(s) helpers to oscar.test.basket
12 years ago
David Winterbottom
98e4cec9ac
Convert TrackStock policy to take an integer
Rather than a StockRecord instance. This makes it much simpler.
12 years ago
David Winterbottom
47963b989d
Fix functional tests
Changes to stock validation are stricter now.
12 years ago
David Winterbottom
efff1bdce0
Adjust product strategy to use standard policies
12 years ago
David Winterbottom
7ab67eb282
Add tests for FixedPrice policy
12 years ago
David Winterbottom
246c2ecc87
Introduce availabilty classes
This are to replace the partner wrappers.
12 years ago
David Winterbottom
b902f33fcb
Add tests for WrappedStockRecord
12 years ago
David Winterbottom
7b6fd5f98d
Remove use of product.stockrecord in tests
12 years ago
David Winterbottom
e46ee500e3
All functional tests pass! Boom!
12 years ago
David Winterbottom
6667e2d8f1
All integration tests pass! Woop!
12 years ago
David Winterbottom
a8fbbc33c9
All unit tests pass! yay!
12 years ago
David Winterbottom
9bdce05760
Add basic tests to availability, prices and strategy modules
12 years ago
David Winterbottom
2b94a8fc1e
Rework how addresses are cleaned
Plus reorganise tests
12 years ago
Izidor Matušov
019598deab
Validate postcodes based on the country
Validation is based on wikipedia list of postal codes [1]. Formats were
converted into regexes for countries.
1: http://en.wikipedia.org/wiki/List_of_postal_codes
Fixes #753
12 years ago
Izidor Matušov
405d927787
Shipping offers with zero discount are not included
Fixes #745
12 years ago
David Winterbottom
a9f7622e1b
Fix Django 1.5 tests caused by using wrong User model
12 years ago
Izidor Matušov
0a8fada6f6
Fix wrong index used in FixedPriceBenefit
Bad index in `last_line = covered_lines[-1][1]` (previously [-1][0])
caused rounding error. When you have 3 products for £7 and benefit 3
things per £20, each product would get discount £0.33 which doesn't sum
up to £1. The existing code handles this but bad indexing makes it fail.
A test case reproducing the issue was added.
Fixes #742
12 years ago
David Winterbottom
6d3ab6739a
Remove UserAddressCreateView from checkout
It's not really needed as it doesn't make sense to simply add an address
to your addressbook as part of checkout.
12 years ago
David Winterbottom
e462f04fd2
Ensure user addresses are unique per user
This change adds a uniqueness constraint on user addresses to prevent
duplicates. A few changes follow:
- The user address forms in account and checkout are modified to take a
user as a constructor arg so uniqueness can be checked.
- The assignment of a user when creating a new address has been moved
into the form.
12 years ago
David Winterbottom
40c79bec07
Moar unit tests for the UserAddress model
Also I moved the generate_hash fn up to the Address superclass as it's
possible that it might be used in other Address classes.
12 years ago
David Winterbottom
3e2e509c80
Fix partner user form regression
Caused by reworking of the user creation form.
12 years ago
David Winterbottom
415aa6423b
Convert order dashboar redirect test to use WebTest
12 years ago
David Winterbottom
f87a18ec19
Fix bug in order dashboard CSV download
12 years ago
Izidor Matušov
b7569ca5a2
Making strings translatable
I used the existing script [1] that cooperates very nicely with vim.
1: https://github.com/rory/django-template-i18n-lint
Fixes #676
12 years ago
Izidor Matušov
1d44ae7916
Test new line is removed from the message subject
12 years ago
David Winterbottom
708c4f3026
Rework customer registration view
- Use a FormView (as it is a form view)
- Move the redirect URL validation into the form
12 years ago
David Winterbottom
2ebb8630d9
Fix bug introduced in ccd1635 re product factory
The backported version didn't explicitly create the ProductAttribute
instances before assigning and so they didn't save.
12 years ago
st4lk
e9e1ffeee7
Add 'parent' argument to category_tree template tag
If parent is given, only parent descendant categories will be returned.
Fixes #741
12 years ago
David Winterbottom
f13df6ff65
Reorganise address tests
12 years ago
David Winterbottom
752663dde9
Convert Address name and salutation to properties
12 years ago
Matus Moravcik
a1a6c602f5
Use get_product_class where possible
12 years ago
David Winterbottom
4f3f2756cb
Rework the shipping event testing methods
12 years ago
David Winterbottom
eb74742ec2
Introduce payment event subtotal calculation
12 years ago
David Winterbottom
11930636c7
Rework shipping event validation
12 years ago
David Winterbottom
0f81a0245c
Enhance order dashboard
- Add more links
- Add event details to line detail page
12 years ago
David Winterbottom
441f9ffc1b
Update bankcard model
12 years ago
David Winterbottom
5009eaad6a
Update Bankcard form
12 years ago
David Winterbottom
65e6effd73
Update payment forms (and tests)
Fields now more self-contained, the bankcard form is much simpler.
12 years ago
David Winterbottom
c66a2e0161
Update the bankcard type sniffing function
12 years ago
David Winterbottom
bf49946a30
Rework shipping repository to use a 'methods' attribute
This makes creating simple shipping repositories simpler as you only
need to override the methods attribute.
12 years ago
David Winterbottom
9d65dbb841
Load User model from compatibility layer
12 years ago
David Winterbottom
4337a27505
Fix two testing issues arising in Django 1.5
12 years ago
Maik Hoepfel
8f9d5db31f
Move django-oscar-testsupport into oscar.test
This allows updating code in both places, if necessary. Getting Django
1.5 support would be painful otherwise. This also removes the circular
dependency of django-oscar-testsupport on Oscar.
The requirements were merged. The imports were updated
accordingly. Unused imports in the touched files were removed. No
further changes.
12 years ago
Maik Hoepfel
1bc23cdbec
Update testing for Django 1.5
* Emailbackend: Updated to use REQUIRED_FIELDS
* Demo and sandbox site now use compat.AUTH_USER_MODEL as well
* Added example custom user that gets tested for Django >= 1.5
12 years ago
chenull
4289f882b5
Support Django's 1.5 AUTH_USER_MODEL feature
13 years ago
David Winterbottom
354a0831fe
Rework validation that local URLs don't already exist
This is required to allow the pages component of the dashboard to
continue to work correctly.
13 years ago
David Winterbottom
1b5adc86d1
Add integration test for ExtendedURLField
13 years ago
David Winterbottom
0aed77500a
Rework ExtendedURLValidator and tests
* Tidy implementation of validator
* Tests improved and moved to tests/integration (as they call resolve
internally)
13 years ago
David Winterbottom
e5310f1147
Adjust test generator to make tests pass
12 years ago