From b1e33ceceda1e75ff68c7deed8f6659683a195d3 Mon Sep 17 00:00:00 2001 From: Dražen Odobašić Date: Fri, 11 Sep 2015 19:33:12 -0400 Subject: Fixed #23395 -- Limited line lengths to 119 characters. --- .../postgres_tests/array_index_migrations/0001_initial.py | 4 +++- tests/postgres_tests/test_array.py | 14 +++++++++++--- tests/postgres_tests/test_ranges.py | 3 ++- 3 files changed, 16 insertions(+), 5 deletions(-) (limited to 'tests/postgres_tests') diff --git a/tests/postgres_tests/array_index_migrations/0001_initial.py b/tests/postgres_tests/array_index_migrations/0001_initial.py index 8c7688ad44..10c1780a46 100644 --- a/tests/postgres_tests/array_index_migrations/0001_initial.py +++ b/tests/postgres_tests/array_index_migrations/0001_initial.py @@ -15,7 +15,9 @@ class Migration(migrations.Migration): name='CharTextArrayIndexModel', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('char', django.contrib.postgres.fields.ArrayField(models.CharField(max_length=10), db_index=True, size=100)), + ('char', django.contrib.postgres.fields.ArrayField( + models.CharField(max_length=10), db_index=True, size=100) + ), ('char2', models.CharField(max_length=11, db_index=True)), ('text', django.contrib.postgres.fields.ArrayField(models.TextField(), db_index=True)), ], diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index 09ae4e8546..fbc15bb2ac 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -341,7 +341,9 @@ class TestMigrations(TransactionTestCase): class TestSerialization(PostgreSQLTestCase): - test_data = '[{"fields": {"field": "[\\"1\\", \\"2\\"]"}, "model": "postgres_tests.integerarraymodel", "pk": null}]' + test_data = ( + '[{"fields": {"field": "[\\"1\\", \\"2\\"]"}, "model": "postgres_tests.integerarraymodel", "pk": null}]' + ) def test_dumping(self): instance = IntegerArrayModel(field=[1, 2]) @@ -360,7 +362,10 @@ class TestValidation(PostgreSQLTestCase): with self.assertRaises(exceptions.ValidationError) as cm: field.clean([1, None], None) self.assertEqual(cm.exception.code, 'item_invalid') - self.assertEqual(cm.exception.message % cm.exception.params, 'Item 1 in the array did not validate: This field cannot be null.') + self.assertEqual( + cm.exception.message % cm.exception.params, + 'Item 1 in the array did not validate: This field cannot be null.' + ) def test_blank_true(self): field = ArrayField(models.IntegerField(blank=True, null=True)) @@ -388,7 +393,10 @@ class TestValidation(PostgreSQLTestCase): with self.assertRaises(exceptions.ValidationError) as cm: field.clean([0], None) self.assertEqual(cm.exception.code, 'item_invalid') - self.assertEqual(cm.exception.messages[0], 'Item 0 in the array did not validate: Ensure this value is greater than or equal to 1.') + self.assertEqual( + cm.exception.messages[0], + 'Item 0 in the array did not validate: Ensure this value is greater than or equal to 1.' + ) class TestSimpleFormField(PostgreSQLTestCase): diff --git a/tests/postgres_tests/test_ranges.py b/tests/postgres_tests/test_ranges.py index 7d7fb33c4d..bde949d218 100644 --- a/tests/postgres_tests/test_ranges.py +++ b/tests/postgres_tests/test_ranges.py @@ -627,5 +627,6 @@ class TestWidget(PostgreSQLTestCase): ) self.assertHTMLEqual( f.widget.render('datetimerange', dt_range), - '' + '' + '' ) -- cgit v1.3