From 4b2b2eda240785dd5146be04ce7357b870ea807a Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sun, 26 Dec 2010 11:45:11 +0000 Subject: [PATCH] Updated list of US states and tests after r15029 to be sorted correctly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15058 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/localflavor/us/us_states.py | 4 ++-- tests/regressiontests/forms/localflavor/us.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/django/contrib/localflavor/us/us_states.py b/django/contrib/localflavor/us/us_states.py index 1174218cc0..f1a3d73aaf 100644 --- a/django/contrib/localflavor/us/us_states.py +++ b/django/contrib/localflavor/us/us_states.py @@ -152,10 +152,10 @@ OBSOLETE_STATES = ( # All US states and territories plus DC and military mail. -STATE_CHOICES = US_STATES + US_TERRITORIES + ARMED_FORCES_STATES +STATE_CHOICES = sorted(US_STATES + US_TERRITORIES + ARMED_FORCES_STATES, key=lambda obj: obj[1]) # All US Postal Service locations. -USPS_CHOICES = US_STATES + US_TERRITORIES + ARMED_FORCES_STATES + COFA_STATES +USPS_CHOICES = sorted(US_STATES + US_TERRITORIES + ARMED_FORCES_STATES + COFA_STATES, key=lambda obj: obj[1]) STATES_NORMALIZED = { 'ak': 'AK', diff --git a/tests/regressiontests/forms/localflavor/us.py b/tests/regressiontests/forms/localflavor/us.py index 65dd1bb084..cde97c8743 100644 --- a/tests/regressiontests/forms/localflavor/us.py +++ b/tests/regressiontests/forms/localflavor/us.py @@ -13,6 +13,9 @@ class USLocalFlavorTests(LocalFlavorTestCase): + + +