Django

Code

Changeset 6183

Show
Ignore:
Timestamp:
09/14/07 04:55:17 (10 months ago)
Author:
mtredinnick
Message:

Fixed a bunch of Python 2.3 issues. Two tests still fail, but this fixes the bulk of things.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/localflavor/br/forms.py

    r6176 r6183  
    99from django.utils.translation import ugettext as _ 
    1010import re 
     11 
     12try: 
     13    set 
     14except NameError: 
     15    from sets import Set as set     # For Python 2.3 
    1116 
    1217phone_digits_re = re.compile(r'^(\d{2})[-\.]?(\d{4})[-\.]?(\d{4})$') 
  • django/trunk/tests/modeltests/test_client/models.py

    r6169 r6183  
    244244        # Log in 
    245245        login = self.client.login(username='testclient', password='password') 
    246         self.assertTrue(login, 'Could not log in') 
     246        self.failUnless(login, 'Could not log in') 
    247247 
    248248        # Request a page that requires a login 
  • django/trunk/tests/regressiontests/test_client_regress/models.py

    r6169 r6183  
    253253        c = Client() 
    254254        login = c.login(username='testclient', password='password') 
    255         self.assertTrue(login, 'Could not log in') 
     255        self.failUnless(login, 'Could not log in') 
    256256 
    257257        # Get a redirection page with the second client. 
  • django/trunk/tests/runtests.py

    r5914 r6183  
    55 
    66import django.contrib as contrib 
     7 
     8try: 
     9    set 
     10except NameError: 
     11    from sets import Set as set     # For Python 2.3 
     12 
     13 
    714CONTRIB_DIR_NAME = 'django.contrib' 
    815MODEL_TESTS_DIR_NAME = 'modeltests'