Ticket #21266: E201.diff

File E201.diff, 3.3 KB (added by Tim Graham, 11 years ago)
  • tests/admin_widgets/tests.py

    diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py
    index c75ffe5..3c93f73 100644
    a b class AdminFileWidgetTest(DjangoTestCase):  
    367367        w = widgets.AdminFileWidget()
    368368        self.assertHTMLEqual(
    369369            w.render('test', album.cover_art),
    370             '<p class="file-upload">Currently: <a href="%(STORAGE_URL)salbums/hybrid_theory.jpg">albums\hybrid_theory.jpg</a> <span class="clearable-file-input"><input type="checkbox" name="test-clear" id="test-clear_id" /> <label for="test-clear_id">Clear</label></span><br />Change: <input type="file" name="test" /></p>' % { 'STORAGE_URL': default_storage.url('') },
     370            '<p class="file-upload">Currently: <a href="%(STORAGE_URL)salbums/hybrid_theory.jpg">albums\hybrid_theory.jpg</a> <span class="clearable-file-input"><input type="checkbox" name="test-clear" id="test-clear_id" /> <label for="test-clear_id">Clear</label></span><br />Change: <input type="file" name="test" /></p>' % {
     371                'STORAGE_URL': default_storage.url(''),
     372            },
    371373        )
    372374
    373375        self.assertHTMLEqual(
  • tests/i18n/tests.py

    diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py
    index dc6c2ea..6d8910b 100644
    a b class FormattingTests(TransRealMixin, TestCase):  
    755755        """
    756756        Tests the {% localize %} templatetag
    757757        """
    758         context = Context({'value': 3.14 })
     758        context = Context({'value': 3.14})
    759759        template1 = Template("{% load l10n %}{% localize %}{{ value }}{% endlocalize %};{% localize on %}{{ value }}{% endlocalize %}")
    760760        template2 = Template("{% load l10n %}{{ value }};{% localize off %}{{ value }};{% endlocalize %}{{ value }}")
    761761        template3 = Template('{% load l10n %}{{ value }};{{ value|unlocalize }}')
    class FormattingTests(TransRealMixin, TestCase):  
    789789                'cents_paid': decimal.Decimal('59.47'),
    790790                'products_delivered': 12000,
    791791                })
    792             context = Context({'form': form })
     792            context = Context({'form': form})
    793793            self.assertTrue(form.is_valid())
    794794
    795795            self.assertHTMLEqual(
  • tests/model_forms/tests.py

    diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py
    index 6e23a0b..8acc88b 100644
    a b class UniqueTest(TestCase):  
    696696
    697697    def test_explicitpk_unspecified(self):
    698698        """Test for primary_key being in the form and failing validation."""
    699         form = ExplicitPKForm({'key': '', 'desc': '' })
     699        form = ExplicitPKForm({'key': '', 'desc': ''})
    700700        self.assertFalse(form.is_valid())
    701701
    702702    def test_explicitpk_unique(self):
  • tests/utils_tests/test_http.py

    diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py
    index f68ac33..9f6bcce 100644
    a b class TestUtilsHttp(unittest.TestCase):  
    3636        self.assertEqual(result, 'a=1&b=2&c=3')
    3737
    3838        # A dictionary
    39         result = http.urlencode({ 'a': 1, 'b': 2, 'c': 3})
     39        result = http.urlencode({'a': 1, 'b': 2, 'c': 3})
    4040        acceptable_results = [
    4141            # Need to allow all of these as dictionaries have to be treated as
    4242            # unordered
Back to Top