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.
The tests check if the year 2010 is a valid option but since only the
last 5 years are rendered this is no longer the case. For now I've
changed the tests to check if 2014 is valid which should be the case the
next few years. A better option is to use the `freezegun` module in the
future.
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