Michael van Tellingen
5c4591fa75
Update tests to stop using nose specific functions
This also removes the attr() marking of tests. This can be implemented
in pytest with marking the tests with a custom marker if required.
10 years ago
Sergey Maranchuk
1e829b18d8
Ensure a Bankcard's type isn't lost after saving
Before this change, the type of a bankcard would be clobbered by saving
and reloading.
Fixes #1486 , #1487
11 years ago
Maik Hoepfel
f1c1da93ff
Minor test suite fixes for Python 3 compatibility
TestCase.assertEquals (note the s at the end) has been deprecated.
The only failing tests remaining are CSV related, which is not
surprising.
12 years ago
danyilmaz
32b7249e44
Allow users to specify card types
Fix to allow users to specify which cards they accept.
By default, this works exactly as it did- i.e., any number
can be entered and only a luhn check is run on it.
Users can now overide this behaviour by passing a list of
accepted cards as a 'types'kwarg to BankcardNumberField,
e.g.
BankcardNumberField(types=[bankcards.VISA, bankcards.VISA_ELECTRON,])
If this is specified, we check that the type of card is one we're
aware of and then that the card number matches the pattern for that
type of card
Fixes #949
@maikhoepfel rewrote the ImproperlyConfigured check using Python's sets.
Conflicts:
oscar/apps/payment/forms.py
12 years ago
Xavier Ordoquy
0a1b4a60c7
assertEquals deprecated in favor of assertEqual
12 years ago
Xavier Ordoquy
3bae3809b8
Use new style exceptions.
12 years ago
David Winterbottom
57cfcc659c
Ensure AMEX cards have 4 digits CCV numbers
12 years ago
David Winterbottom
779f4c4739
Use '' as default instead of None in payment methods
Write a few more tests at the same time.
12 years ago
David Winterbottom
c9a734a8c9
Adjust bankcard model to provide an obfuscated number property
Useful in templates where the bankcard form is rendered. Eg:
{{ bankcard_form.bankcard.obfuscated_number }}
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
b17b9b75df
Move assert function to module level for generator tests
This is required for multiprocess testing to work (eg ./runtests.py
--processes=2)
12 years ago
David Winterbottom
f9799d5029
Reorganise payment tests
12 years ago