Ticket #16196: 16196_fixed.diff

File 16196_fixed.diff, 11.7 KB (added by Stephen Burrows, 13 years ago)
  • tests/regressiontests/cache/tests.py

    diff --git a/tests/regressiontests/cache/tests.py b/tests/regressiontests/cache/tests.py
    index c5349d5..cf74b74 100644
    a b class DummyCacheTests(unittest.TestCase):  
    131131            u'ascii': u'ascii_value',
    132132            u'unicode_ascii': u'Iñtërnâtiônàlizætiøn1',
    133133            u'Iñtërnâtiônàlizætiøn': u'Iñtërnâtiônàlizætiøn2',
    134             u'ascii': {u'x' : 1 }
     134            u'ascii2': {u'x' : 1 }
    135135            }
    136136        for (key, value) in stuff.items():
    137137            self.cache.set(key, value)
    class BaseCacheTests(object):  
    317317            u'ascii': u'ascii_value',
    318318            u'unicode_ascii': u'Iñtërnâtiônàlizætiøn1',
    319319            u'Iñtërnâtiônàlizætiøn': u'Iñtërnâtiônàlizætiøn2',
    320             u'ascii': {u'x' : 1 }
     320            u'ascii2': {u'x' : 1 }
    321321            }
    322322        # Test `set`
    323323        for (key, value) in stuff.items():
  • tests/regressiontests/delete_regress/tests.py

    diff --git a/tests/regressiontests/delete_regress/tests.py b/tests/regressiontests/delete_regress/tests.py
    index 2027780..ec26676 100644
    a b class DeleteLockingTest(TransactionTestCase):  
    5454        # Delete something using connection 2.
    5555        cursor2 = self.conn2.cursor()
    5656        cursor2.execute('DELETE from delete_regress_book WHERE id=1')
    57         self.conn2._commit();
     57        self.conn2._commit()
    5858
    5959        # Now perform a queryset delete that covers the object
    6060        # deleted in connection 2. This causes an infinite loop
  • tests/regressiontests/forms/localflavor/ar.py

    diff --git a/tests/regressiontests/forms/localflavor/ar.py b/tests/regressiontests/forms/localflavor/ar.py
    index 9c67269..f0416e1 100644
    a b class ARLocalFlavorTests(LocalFlavorTestCase):  
    9292            '20-10123456': error_format,
    9393            '20-10123456-': error_format,
    9494             '20-10123456-5': error_invalid,
    95             '2-10123456-9': error_format,
    9695             '27-10345678-1': error_invalid,
    9796             u'27-10345678-1': error_invalid,
    9897        }
  • tests/regressiontests/forms/localflavor/id.py

    diff --git a/tests/regressiontests/forms/localflavor/id.py b/tests/regressiontests/forms/localflavor/id.py
    index 2e8c510..71a8d9f 100644
    a b class IDLocalFlavorTests(LocalFlavorTestCase):  
    133133        invalid = {
    134134            '0123456789': error_invalid,
    135135            '+62-021-3456789': error_invalid,
    136             '+62-021-3456789': error_invalid,
    137136            '+62-0812-3456789': error_invalid,
    138137            '0812345678901': error_invalid,
    139138            'foo': error_invalid,
  • tests/regressiontests/forms/localflavor/pt.py

    diff --git a/tests/regressiontests/forms/localflavor/pt.py b/tests/regressiontests/forms/localflavor/pt.py
    index b8d784a..333f96d 100644
    a b class PTLocalFlavorTests(LocalFlavorTestCase):  
    2121        valid = {
    2222            '917845189': '917845189',
    2323            '91 784 5189': '917845189',
    24             '91 784 5189': '917845189',
    2524            '+351 91 111': '+35191111',
    2625            '00351873': '00351873',
    2726        }
  • tests/regressiontests/generic_views/views.py

    diff --git a/tests/regressiontests/generic_views/views.py b/tests/regressiontests/generic_views/views.py
    index 9d2770c..0c8fd49 100644
    a b class DictList(generic.ListView):  
    4242    """A ListView that doesn't use a model."""
    4343    queryset = [
    4444        {'first': 'John', 'last': 'Lennon'},
    45         {'last': 'Yoko',  'last': 'Ono'}
     45        {'first': 'Yoko',  'last': 'Ono'}
    4646    ]
    4747    template_name = 'generic_views/list.html'
    4848
    class CustomPaginator(Paginator):  
    6565            allow_empty_first_page=allow_empty_first_page)
    6666
    6767class AuthorListCustomPaginator(AuthorList):
    68     paginate_by = 5;
     68    paginate_by = 5
    6969
    7070    def get_paginator(self, queryset, page_size, orphans=0, allow_empty_first_page=True):
    7171        return super(AuthorListCustomPaginator, self).get_paginator(
  • tests/regressiontests/introspection/tests.py

    diff --git a/tests/regressiontests/introspection/tests.py b/tests/regressiontests/introspection/tests.py
    index 7481641..e309a98 100644
    a b class IntrospectionTests(TestCase):  
    4545
    4646    def test_django_table_names(self):
    4747        cursor = connection.cursor()
    48         cursor.execute('CREATE TABLE django_ixn_test_table (id INTEGER);');
     48        cursor.execute('CREATE TABLE django_ixn_test_table (id INTEGER);')
    4949        tl = connection.introspection.django_table_names()
    5050        cursor.execute("DROP TABLE django_ixn_test_table;")
    5151        self.assertTrue('django_ixn_testcase_table' not in tl,
  • tests/regressiontests/model_regress/tests.py

    diff --git a/tests/regressiontests/model_regress/tests.py b/tests/regressiontests/model_regress/tests.py
    index a103590..db539f2 100644
    a b class ModelTests(TestCase):  
    4848            article_text = "ABCDE" * 1000
    4949        )
    5050        a = Article.objects.get(pk=a.pk)
    51         self.assertEqual
    52         (len(a.article_text), 5000)
     51        self.assertEqual(len(a.article_text), 5000)
    5352
    5453    def test_date_lookup(self):
    5554        # Regression test for #659
  • tests/regressiontests/multiple_database/tests.py

    diff --git a/tests/regressiontests/multiple_database/tests.py b/tests/regressiontests/multiple_database/tests.py
    index 110ee1e..551a677 100644
    a b class AntiPetRouter(object):  
    16121612            return model._meta.object_name == 'Pet'
    16131613        else:
    16141614            return model._meta.object_name != 'Pet'
    1615         return None
    16161615
    16171616class FixtureTestCase(TestCase):
    16181617    multi_db = True
  • tests/regressiontests/syndication/tests.py

    diff --git a/tests/regressiontests/syndication/tests.py b/tests/regressiontests/syndication/tests.py
    index 58e6373..2f90dc0 100644
    a b class FeedTestCase(TestCase):  
    2525                elem.getElementsByTagName(k)[0].firstChild.wholeText, v)
    2626
    2727    def assertCategories(self, elem, expected):
    28         self.assertEqual(set(i.firstChild.wholeText for i in elem.childNodes if i.nodeName == 'category'), set(expected));
     28        self.assertEqual(set(i.firstChild.wholeText for i in elem.childNodes if i.nodeName == 'category'), set(expected))
    2929
    3030######################################
    3131# Feed view
    class SyndicationFeedTest(FeedTestCase):  
    7373            'ttl': '600',
    7474            'copyright': 'Copyright (c) 2007, Sally Smith',
    7575        })
    76         self.assertCategories(chan, ['python', 'django']);
     76        self.assertCategories(chan, ['python', 'django'])
    7777
    7878        # Ensure the content of the channel is correct
    7979        self.assertChildNodeContent(chan, {
    class SyndicationFeedTest(FeedTestCase):  
    102102            'pubDate': pub_date,
    103103            'author': 'test@example.com (Sally Smith)',
    104104        })
    105         self.assertCategories(items[0], ['python', 'testing']);
     105        self.assertCategories(items[0], ['python', 'testing'])
    106106
    107107        for item in items:
    108108            self.assertChildNodes(item, ['title', 'link', 'description', 'guid', 'category', 'pubDate', 'author'])
  • tests/regressiontests/templates/tests.py

    diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
    index 1f065f9..a561686 100644
    a b class Templates(unittest.TestCase):  
    12821282            'legacyi18n28': ('{% load i18n %}{% blocktrans with anton as a and berta as b %}{{ a }} + {{ b }}{% endblocktrans %}', {'anton': 'α', 'berta': 'β'}, u'α + β'),
    12831283
    12841284            # retrieving language information
    1285             'i18n28': ('{% load i18n %}{% get_language_info for "de" as l %}{{ l.code }}: {{ l.name }}/{{ l.name_local }} bidi={{ l.bidi }}', {}, 'de: German/Deutsch bidi=False'),
     1285            'i18n28_2': ('{% load i18n %}{% get_language_info for "de" as l %}{{ l.code }}: {{ l.name }}/{{ l.name_local }} bidi={{ l.bidi }}', {}, 'de: German/Deutsch bidi=False'),
    12861286            'i18n29': ('{% load i18n %}{% get_language_info for LANGUAGE_CODE as l %}{{ l.code }}: {{ l.name }}/{{ l.name_local }} bidi={{ l.bidi }}', {'LANGUAGE_CODE': 'fi'}, 'fi: Finnish/suomi bidi=False'),
    12871287            'i18n30': ('{% load i18n %}{% get_language_info_list for langcodes as langs %}{% for l in langs %}{{ l.code }}: {{ l.name }}/{{ l.name_local }} bidi={{ l.bidi }}; {% endfor %}', {'langcodes': ['it', 'no']}, u'it: Italian/italiano bidi=False; no: Norwegian/Norsk bidi=False; '),
    12881288            'i18n31': ('{% load i18n %}{% get_language_info_list for langcodes as langs %}{% for l in langs %}{{ l.code }}: {{ l.name }}/{{ l.name_local }} bidi={{ l.bidi }}; {% endfor %}', {'langcodes': (('sl', 'Slovenian'), ('fa', 'Persian'))}, u'sl: Slovenian/Sloven\u0161\u010dina bidi=False; fa: Persian/\u0641\u0627\u0631\u0633\u06cc bidi=True; '),
    class Templates(unittest.TestCase):  
    12981298            'invalidstr02': ('{{ var|default_if_none:"Foo" }}', {}, ('','INVALID')),
    12991299            'invalidstr03': ('{% for v in var %}({{ v }}){% endfor %}', {}, ''),
    13001300            'invalidstr04': ('{% if var %}Yes{% else %}No{% endif %}', {}, 'No'),
    1301             'invalidstr04': ('{% if var|default:"Foo" %}Yes{% else %}No{% endif %}', {}, 'Yes'),
     1301            'invalidstr04_2': ('{% if var|default:"Foo" %}Yes{% else %}No{% endif %}', {}, 'Yes'),
    13021302            'invalidstr05': ('{{ var }}', {}, ('', ('INVALID %s', 'var'))),
    13031303            'invalidstr06': ('{{ var.prop }}', {'var': {}}, ('', ('INVALID %s', 'var.prop'))),
    13041304
    class Templates(unittest.TestCase):  
    13231323                            """),
    13241324
    13251325            ### REGROUP TAG ###########################################################
    1326             'regroup01': ('{% regroup data by bar as grouped %}' + \
    1327                           '{% for group in grouped %}' + \
    1328                           '{{ group.grouper }}:' + \
    1329                           '{% for item in group.list %}' + \
    1330                           '{{ item.foo }}' + \
    1331                           '{% endfor %},' + \
     1326            'regroup01': ('{% regroup data by bar as grouped %}'
     1327                          '{% for group in grouped %}'
     1328                          '{{ group.grouper }}:'
     1329                          '{% for item in group.list %}'
     1330                          '{{ item.foo }}'
     1331                          '{% endfor %},'
    13321332                          '{% endfor %}',
    13331333                          {'data': [ {'foo':'c', 'bar':1},
    13341334                                     {'foo':'d', 'bar':1},
    class Templates(unittest.TestCase):  
    13381338                          '1:cd,2:ab,3:x,'),
    13391339
    13401340            # Test for silent failure when target variable isn't found
    1341             'regroup02': ('{% regroup data by bar as grouped %}' + \
    1342                           '{% for group in grouped %}' + \
    1343                           '{{ group.grouper }}:' + \
    1344                           '{% for item in group.list %}' + \
    1345                           '{{ item.foo }}' + \
    1346                           '{% endfor %},' + \
     1341            'regroup02': ('{% regroup data by bar as grouped %}'
     1342                          '{% for group in grouped %}'
     1343                          '{{ group.grouper }}:'
     1344                          '{% for item in group.list %}'
     1345                          '{{ item.foo }}'
     1346                          '{% endfor %},'
    13471347                          '{% endfor %}',
    13481348                          {}, ''),
    13491349            ### SSI TAG ########################################################
Back to Top