Ticket #5939: ca_provinces.2.diff

File ca_provinces.2.diff, 925 bytes (added by Rajesh Dhawan, 17 years ago)

Better patch to add the missing mapping for "NB" as well as a couple of regression tests

  • django/contrib/localflavor/ca/ca_provinces.py

     
    3333    'british columbia': 'BC',
    3434    'mb': 'MB',
    3535    'manitoba': 'MB',
     36    'nb': 'NB',
     37    'new brunswick': 'NB',
    3638    'nf': 'NF',
    3739    'newfoundland': 'NF',
    3840    'newfoundland and labrador': 'NF',
  • tests/regressiontests/forms/localflavor/ca.py

     
    147147u'NS'
    148148>>> f.clean('  manitoba ')
    149149u'MB'
     150>>> f.clean(' new brunswick ')
     151u'NB'
     152>>> f.clean('NB')
     153u'NB'
    150154>>> f.clean('T2S 2H7')
    151155Traceback (most recent call last):
    152156...
Back to Top