diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py
index c75ffe5..3c93f73 100644
|
a
|
b
|
class AdminFileWidgetTest(DjangoTestCase):
|
| 367 | 367 | w = widgets.AdminFileWidget() |
| 368 | 368 | self.assertHTMLEqual( |
| 369 | 369 | 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 | }, |
| 371 | 373 | ) |
| 372 | 374 | |
| 373 | 375 | self.assertHTMLEqual( |
diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py
index dc6c2ea..6d8910b 100644
|
a
|
b
|
class FormattingTests(TransRealMixin, TestCase):
|
| 755 | 755 | """ |
| 756 | 756 | Tests the {% localize %} templatetag |
| 757 | 757 | """ |
| 758 | | context = Context({'value': 3.14 }) |
| | 758 | context = Context({'value': 3.14}) |
| 759 | 759 | template1 = Template("{% load l10n %}{% localize %}{{ value }}{% endlocalize %};{% localize on %}{{ value }}{% endlocalize %}") |
| 760 | 760 | template2 = Template("{% load l10n %}{{ value }};{% localize off %}{{ value }};{% endlocalize %}{{ value }}") |
| 761 | 761 | template3 = Template('{% load l10n %}{{ value }};{{ value|unlocalize }}') |
| … |
… |
class FormattingTests(TransRealMixin, TestCase):
|
| 789 | 789 | 'cents_paid': decimal.Decimal('59.47'), |
| 790 | 790 | 'products_delivered': 12000, |
| 791 | 791 | }) |
| 792 | | context = Context({'form': form }) |
| | 792 | context = Context({'form': form}) |
| 793 | 793 | self.assertTrue(form.is_valid()) |
| 794 | 794 | |
| 795 | 795 | self.assertHTMLEqual( |
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py
index 6e23a0b..8acc88b 100644
|
a
|
b
|
class UniqueTest(TestCase):
|
| 696 | 696 | |
| 697 | 697 | def test_explicitpk_unspecified(self): |
| 698 | 698 | """Test for primary_key being in the form and failing validation.""" |
| 699 | | form = ExplicitPKForm({'key': '', 'desc': '' }) |
| | 699 | form = ExplicitPKForm({'key': '', 'desc': ''}) |
| 700 | 700 | self.assertFalse(form.is_valid()) |
| 701 | 701 | |
| 702 | 702 | def test_explicitpk_unique(self): |
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):
|
| 36 | 36 | self.assertEqual(result, 'a=1&b=2&c=3') |
| 37 | 37 | |
| 38 | 38 | # A dictionary |
| 39 | | result = http.urlencode({ 'a': 1, 'b': 2, 'c': 3}) |
| | 39 | result = http.urlencode({'a': 1, 'b': 2, 'c': 3}) |
| 40 | 40 | acceptable_results = [ |
| 41 | 41 | # Need to allow all of these as dictionaries have to be treated as |
| 42 | 42 | # unordered |