summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlasdair Nicol <alasdair@memset.com>2013-10-17 23:27:45 +0100
committerTim Graham <timograham@gmail.com>2013-10-17 20:20:11 -0400
commitdfb4cb9970f86487f0aaa88c5dfcfafa31e4f430 (patch)
tree4762099924f11873e9b6608e6f056939f16410b9 /tests
parentd97bec5ee3a6284d30b613c9070588a60358e7ec (diff)
Fixed #21285 -- Fixed E121,E122 pep8 warnings
Diffstat (limited to 'tests')
-rw-r--r--tests/bulk_create/tests.py8
-rw-r--r--tests/cache/tests.py2
-rw-r--r--tests/extra_regress/tests.py4
-rw-r--r--tests/forms_tests/tests/test_media.py92
-rw-r--r--tests/model_regress/tests.py2
-rw-r--r--tests/prefetch_related/tests.py6
-rw-r--r--tests/serializers/tests.py6
-rw-r--r--tests/serializers_regress/tests.py28
-rw-r--r--tests/signals_regress/tests.py6
-rw-r--r--tests/template_tests/filters.py16
-rw-r--r--tests/test_utils/tests.py6
11 files changed, 88 insertions, 88 deletions
diff --git a/tests/bulk_create/tests.py b/tests/bulk_create/tests.py
index 94258ca711..dada5326c9 100644
--- a/tests/bulk_create/tests.py
+++ b/tests/bulk_create/tests.py
@@ -94,8 +94,8 @@ class BulkCreateTests(TestCase):
with override_settings(DEBUG=True):
connection.queries = []
TwoFields.objects.bulk_create([
- TwoFields(f1=i, f2=i+1) for i in range(0, 1001)
- ])
+ TwoFields(f1=i, f2=i+1) for i in range(0, 1001)
+ ])
self.assertEqual(TwoFields.objects.count(), 1001)
self.assertEqual(
TwoFields.objects.filter(f1__gte=450, f1__lte=550).count(),
@@ -115,8 +115,8 @@ class BulkCreateTests(TestCase):
with override_settings(DEBUG=True):
connection.queries = []
TwoFields.objects.bulk_create([
- TwoFields(f1=i, f2=i+1) for i in range(0, 1001)
- ])
+ TwoFields(f1=i, f2=i+1) for i in range(0, 1001)
+ ])
self.assertTrue(len(connection.queries) < 10)
def test_large_batch_mixed(self):
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index ee6df48b03..a8b23f139d 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -867,7 +867,7 @@ class DBCacheTests(BaseCacheTests, TransactionTestCase):
def test_second_call_doesnt_crash(self):
stdout = six.StringIO()
management.call_command(
- 'createcachetable',
+ 'createcachetable',
stdout=stdout
)
self.assertEqual(stdout.getvalue(),
diff --git a/tests/extra_regress/tests.py b/tests/extra_regress/tests.py
index ae8f1b4423..a34c1f5a5f 100644
--- a/tests/extra_regress/tests.py
+++ b/tests/extra_regress/tests.py
@@ -306,14 +306,14 @@ class ExtraRegressTests(TestCase):
self.assertQuerysetEqual(
TestObject.objects.filter(
- pk__in=TestObject.objects.values('pk').extra(select={'extra': 1})
+ pk__in=TestObject.objects.values('pk').extra(select={'extra': 1})
),
['<TestObject: TestObject: first,second,third>']
)
self.assertQuerysetEqual(
TestObject.objects.filter(pk=obj.pk) |
- TestObject.objects.extra(where=["id > %s"], params=[obj.pk]),
+ TestObject.objects.extra(where=["id > %s"], params=[obj.pk]),
['<TestObject: TestObject: first,second,third>']
)
diff --git a/tests/forms_tests/tests/test_media.py b/tests/forms_tests/tests/test_media.py
index 7061759bc3..9c175c5c99 100644
--- a/tests/forms_tests/tests/test_media.py
+++ b/tests/forms_tests/tests/test_media.py
@@ -23,7 +23,7 @@ class FormsMediaTestCase(TestCase):
class Foo:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -52,7 +52,7 @@ class FormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -77,21 +77,21 @@ class FormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
class MyWidget2(TextInput):
class Media:
css = {
- 'all': ('/path/to/css2','/path/to/css3')
+ 'all': ('/path/to/css2','/path/to/css3')
}
js = ('/path/to/js1','/path/to/js4')
class MyWidget3(TextInput):
class Media:
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -158,7 +158,7 @@ class FormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -185,7 +185,7 @@ class FormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -203,7 +203,7 @@ class FormsMediaTestCase(TestCase):
class MyWidget8(MyWidget1):
class Media:
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -222,7 +222,7 @@ class FormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -249,7 +249,7 @@ class FormsMediaTestCase(TestCase):
class Media:
extend = False
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -264,7 +264,7 @@ class FormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -272,7 +272,7 @@ class FormsMediaTestCase(TestCase):
class Media:
extend = True
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -290,7 +290,7 @@ class FormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -298,7 +298,7 @@ class FormsMediaTestCase(TestCase):
class Media:
extend = ('css',)
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -318,9 +318,9 @@ class FormsMediaTestCase(TestCase):
class MultimediaWidget(TextInput):
class Media:
css = {
- 'screen, print': ('/file1','/file2'),
- 'screen': ('/file3',),
- 'print': ('/file4',)
+ 'screen, print': ('/file1','/file2'),
+ 'screen': ('/file3',),
+ 'print': ('/file4',)
}
js = ('/path/to/js1','/path/to/js4')
@@ -340,21 +340,21 @@ class FormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
class MyWidget2(TextInput):
class Media:
css = {
- 'all': ('/path/to/css2','/path/to/css3')
+ 'all': ('/path/to/css2','/path/to/css3')
}
js = ('/path/to/js1','/path/to/js4')
class MyWidget3(TextInput):
class Media:
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -382,21 +382,21 @@ class FormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
class MyWidget2(TextInput):
class Media:
css = {
- 'all': ('/path/to/css2','/path/to/css3')
+ 'all': ('/path/to/css2','/path/to/css3')
}
js = ('/path/to/js1','/path/to/js4')
class MyWidget3(TextInput):
class Media:
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -474,7 +474,7 @@ class StaticFormsMediaTestCase(TestCase):
class Foo:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -503,7 +503,7 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -528,21 +528,21 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
class MyWidget2(TextInput):
class Media:
css = {
- 'all': ('/path/to/css2','/path/to/css3')
+ 'all': ('/path/to/css2','/path/to/css3')
}
js = ('/path/to/js1','/path/to/js4')
class MyWidget3(TextInput):
class Media:
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -609,7 +609,7 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -636,7 +636,7 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -654,7 +654,7 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget8(MyWidget1):
class Media:
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -673,7 +673,7 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -700,7 +700,7 @@ class StaticFormsMediaTestCase(TestCase):
class Media:
extend = False
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -715,7 +715,7 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -723,7 +723,7 @@ class StaticFormsMediaTestCase(TestCase):
class Media:
extend = True
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -741,7 +741,7 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
@@ -749,7 +749,7 @@ class StaticFormsMediaTestCase(TestCase):
class Media:
extend = ('css',)
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -769,9 +769,9 @@ class StaticFormsMediaTestCase(TestCase):
class MultimediaWidget(TextInput):
class Media:
css = {
- 'screen, print': ('/file1','/file2'),
- 'screen': ('/file3',),
- 'print': ('/file4',)
+ 'screen, print': ('/file1','/file2'),
+ 'screen': ('/file3',),
+ 'print': ('/file4',)
}
js = ('/path/to/js1','/path/to/js4')
@@ -791,21 +791,21 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
class MyWidget2(TextInput):
class Media:
css = {
- 'all': ('/path/to/css2','/path/to/css3')
+ 'all': ('/path/to/css2','/path/to/css3')
}
js = ('/path/to/js1','/path/to/js4')
class MyWidget3(TextInput):
class Media:
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
@@ -833,21 +833,21 @@ class StaticFormsMediaTestCase(TestCase):
class MyWidget1(TextInput):
class Media:
css = {
- 'all': ('path/to/css1','/path/to/css2')
+ 'all': ('path/to/css1','/path/to/css2')
}
js = ('/path/to/js1','http://media.other.com/path/to/js2','https://secure.other.com/path/to/js3')
class MyWidget2(TextInput):
class Media:
css = {
- 'all': ('/path/to/css2','/path/to/css3')
+ 'all': ('/path/to/css2','/path/to/css3')
}
js = ('/path/to/js1','/path/to/js4')
class MyWidget3(TextInput):
class Media:
css = {
- 'all': ('/path/to/css3','path/to/css1')
+ 'all': ('/path/to/css3','path/to/css1')
}
js = ('/path/to/js1','/path/to/js4')
diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py
index a0293975aa..fdb3b1f87c 100644
--- a/tests/model_regress/tests.py
+++ b/tests/model_regress/tests.py
@@ -131,7 +131,7 @@ class ModelTests(TestCase):
datetime.date(1, 3, 3),
],
attrgetter("when")
- )
+ )
if (3,) <= sys.version_info < (3, 3) and connection.vendor == 'mysql':
# In Python < 3.3, datetime.strftime raises an exception for years
diff --git a/tests/prefetch_related/tests.py b/tests/prefetch_related/tests.py
index 6e0b617161..6f51d8d035 100644
--- a/tests/prefetch_related/tests.py
+++ b/tests/prefetch_related/tests.py
@@ -440,9 +440,9 @@ class ForeignKeyToFieldTest(TestCase):
with self.assertNumQueries(3):
qs = Author.objects.all().prefetch_related('favorite_authors', 'favors_me')
favorites = [(
- [six.text_type(i_like) for i_like in author.favorite_authors.all()],
- [six.text_type(likes_me) for likes_me in author.favors_me.all()]
- ) for author in qs]
+ [six.text_type(i_like) for i_like in author.favorite_authors.all()],
+ [six.text_type(likes_me) for likes_me in author.favors_me.all()]
+ ) for author in qs]
self.assertEqual(
favorites,
[
diff --git a/tests/serializers/tests.py b/tests/serializers/tests.py
index 34878adfd2..9b911191a4 100644
--- a/tests/serializers/tests.py
+++ b/tests/serializers/tests.py
@@ -246,9 +246,9 @@ class SerializersTestBase(object):
# Regression for #12524 -- dates before 1000AD get prefixed
# 0's on the year
a = Article.objects.create(
- author = self.jane,
- headline = "Nobody remembers the early years",
- pub_date = datetime(1, 2, 3, 4, 5, 6))
+ author = self.jane,
+ headline = "Nobody remembers the early years",
+ pub_date = datetime(1, 2, 3, 4, 5, 6))
serial_str = serializers.serialize(self.serializer_name, [a])
date_values = self._get_field_values(serial_str, "pub_date")
diff --git a/tests/serializers_regress/tests.py b/tests/serializers_regress/tests.py
index 83561e9c46..a35d7851e0 100644
--- a/tests/serializers_regress/tests.py
+++ b/tests/serializers_regress/tests.py
@@ -121,13 +121,13 @@ def data_compare(testcase, pk, klass, data):
if klass == BinaryData and data is not None:
testcase.assertEqual(bytes(data), bytes(instance.data),
"Objects with PK=%d not equal; expected '%s' (%s), got '%s' (%s)" % (
- pk, repr(bytes(data)), type(data), repr(bytes(instance.data)),
- type(instance.data))
+ pk, repr(bytes(data)), type(data), repr(bytes(instance.data)),
+ type(instance.data))
)
else:
testcase.assertEqual(data, instance.data,
"Objects with PK=%d not equal; expected '%s' (%s), got '%s' (%s)" % (
- pk, data, type(data), instance, type(instance.data))
+ pk, data, type(data), instance, type(instance.data))
)
def generic_compare(testcase, pk, klass, data):
@@ -205,7 +205,7 @@ test_data = [
(data_obj, 41, EmailData, None),
(data_obj, 42, EmailData, ""),
(data_obj, 50, FileData, 'file:///foo/bar/whiz.txt'),
-# (data_obj, 51, FileData, None),
+ # (data_obj, 51, FileData, None),
(data_obj, 52, FileData, ""),
(data_obj, 60, FilePathData, "/foo/bar/whiz.txt"),
(data_obj, 61, FilePathData, None),
@@ -308,10 +308,10 @@ The end."""),
(pk_obj, 601, BooleanPKData, True),
(pk_obj, 602, BooleanPKData, False),
(pk_obj, 610, CharPKData, "Test Char PKData"),
-# (pk_obj, 620, DatePKData, datetime.date(2006,6,16)),
-# (pk_obj, 630, DateTimePKData, datetime.datetime(2006,6,16,10,42,37)),
+ # (pk_obj, 620, DatePKData, datetime.date(2006,6,16)),
+ # (pk_obj, 630, DateTimePKData, datetime.datetime(2006,6,16,10,42,37)),
(pk_obj, 640, EmailPKData, "hovercraft@example.com"),
-# (pk_obj, 650, FilePKData, 'file:///foo/bar/whiz.txt'),
+ # (pk_obj, 650, FilePKData, 'file:///foo/bar/whiz.txt'),
(pk_obj, 660, FilePathPKData, "/foo/bar/whiz.txt"),
(pk_obj, 670, DecimalPKData, decimal.Decimal('12.345')),
(pk_obj, 671, DecimalPKData, decimal.Decimal('-12.345')),
@@ -322,7 +322,7 @@ The end."""),
(pk_obj, 680, IntegerPKData, 123456789),
(pk_obj, 681, IntegerPKData, -123456789),
(pk_obj, 682, IntegerPKData, 0),
-# (XX, ImagePKData
+ # (XX, ImagePKData
(pk_obj, 690, IPAddressPKData, "127.0.0.1"),
(pk_obj, 695, GenericIPAddressPKData, "fe80:1424:2223:6cff:fe8a:2e8a:2151:abcd"),
# (pk_obj, 700, NullBooleanPKData, True),
@@ -333,12 +333,12 @@ The end."""),
(pk_obj, 750, SmallPKData, 12),
(pk_obj, 751, SmallPKData, -12),
(pk_obj, 752, SmallPKData, 0),
-# (pk_obj, 760, TextPKData, """This is a long piece of text.
-# It contains line breaks.
-# Several of them.
-# The end."""),
-# (pk_obj, 770, TimePKData, datetime.time(10,42,37)),
-# (pk_obj, 790, XMLPKData, "<foo></foo>"),
+ # (pk_obj, 760, TextPKData, """This is a long piece of text.
+ # It contains line breaks.
+ # Several of them.
+ # The end."""),
+ # (pk_obj, 770, TimePKData, datetime.time(10,42,37)),
+ # (pk_obj, 790, XMLPKData, "<foo></foo>"),
(data_obj, 800, AutoNowDateTimeData, datetime.datetime(2006,6,16,10,42,37)),
(data_obj, 810, ModifyingSaveData, 42),
diff --git a/tests/signals_regress/tests.py b/tests/signals_regress/tests.py
index 328e699b9d..6d15553c26 100644
--- a/tests/signals_regress/tests.py
+++ b/tests/signals_regress/tests.py
@@ -45,9 +45,9 @@ class SignalsRegressTests(TestCase):
# Save up the number of connected signals so that we can check at the end
# that all the signals we register get properly unregistered (#9989)
self.pre_signals = (len(models.signals.pre_save.receivers),
- len(models.signals.post_save.receivers),
- len(models.signals.pre_delete.receivers),
- len(models.signals.post_delete.receivers))
+ len(models.signals.post_save.receivers),
+ len(models.signals.pre_delete.receivers),
+ len(models.signals.post_delete.receivers))
models.signals.pre_save.connect(self.pre_save_test)
models.signals.post_save.connect(self.post_save_test)
diff --git a/tests/template_tests/filters.py b/tests/template_tests/filters.py
index 3addec24a7..2845bc9ff6 100644
--- a/tests/template_tests/filters.py
+++ b/tests/template_tests/filters.py
@@ -371,12 +371,12 @@ def get_filter_tests():
'time05': (r'{{ d|time:"P:e:O:T:Z" }}', {'d': today}, ''),
'time06': (r'{{ obj|time:"P:e:O:T:Z" }}', {'obj': 'non-datetime-value'}, ''),
- # Tests for #11687 and #16676
- 'add01': (r'{{ i|add:"5" }}', {'i': 2000}, '2005'),
- 'add02': (r'{{ i|add:"napis" }}', {'i': 2000}, ''),
- 'add03': (r'{{ i|add:16 }}', {'i': 'not_an_int'}, ''),
- 'add04': (r'{{ i|add:"16" }}', {'i': 'not_an_int'}, 'not_an_int16'),
- 'add05': (r'{{ l1|add:l2 }}', {'l1': [1, 2], 'l2': [3, 4]}, '[1, 2, 3, 4]'),
- 'add06': (r'{{ t1|add:t2 }}', {'t1': (3, 4), 't2': (1, 2)}, '(3, 4, 1, 2)'),
- 'add07': (r'{{ d|add:t }}', {'d': date(2000, 1, 1), 't': timedelta(10)}, 'Jan. 11, 2000'),
+ # Tests for #11687 and #16676
+ 'add01': (r'{{ i|add:"5" }}', {'i': 2000}, '2005'),
+ 'add02': (r'{{ i|add:"napis" }}', {'i': 2000}, ''),
+ 'add03': (r'{{ i|add:16 }}', {'i': 'not_an_int'}, ''),
+ 'add04': (r'{{ i|add:"16" }}', {'i': 'not_an_int'}, 'not_an_int16'),
+ 'add05': (r'{{ l1|add:l2 }}', {'l1': [1, 2], 'l2': [3, 4]}, '[1, 2, 3, 4]'),
+ 'add06': (r'{{ t1|add:t2 }}', {'t1': (3, 4), 't2': (1, 2)}, '(3, 4, 1, 2)'),
+ 'add07': (r'{{ d|add:t }}', {'d': date(2000, 1, 1), 't': timedelta(10)}, 'Jan. 11, 2000'),
}
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py
index 94ba95455b..af2eef6747 100644
--- a/tests/test_utils/tests.py
+++ b/tests/test_utils/tests.py
@@ -397,13 +397,13 @@ class HTMLEqualTests(TestCase):
def test_complex_examples(self):
self.assertHTMLEqual(
- """<tr><th><label for="id_first_name">First name:</label></th>
+ """<tr><th><label for="id_first_name">First name:</label></th>
<td><input type="text" name="first_name" value="John" id="id_first_name" /></td></tr>
<tr><th><label for="id_last_name">Last name:</label></th>
<td><input type="text" id="id_last_name" name="last_name" value="Lennon" /></td></tr>
<tr><th><label for="id_birthday">Birthday:</label></th>
<td><input type="text" value="1940-10-9" name="birthday" id="id_birthday" /></td></tr>""",
- """
+ """
<tr><th>
<label for="id_first_name">First name:</label></th><td><input type="text" name="first_name" value="John" id="id_first_name" />
</td></tr>
@@ -416,7 +416,7 @@ class HTMLEqualTests(TestCase):
""")
self.assertHTMLEqual(
- """<!DOCTYPE html>
+ """<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet">