diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2017-12-28 21:07:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-28 21:07:29 +0100 |
| commit | 83a36ac49a98d5d8801ed8428612e9a56aeb8699 (patch) | |
| tree | 192e9bb3f114dad49ffacb17d51a8ecc9faed797 /tests | |
| parent | 058d112ed2635873d415661bdf0fcc8752ec37c9 (diff) | |
Removed unnecessary trailing commas and spaces in various code.
Diffstat (limited to 'tests')
25 files changed, 65 insertions, 65 deletions
diff --git a/tests/admin_filters/tests.py b/tests/admin_filters/tests.py index 4a11c1a96b..200c8c8db1 100644 --- a/tests/admin_filters/tests.py +++ b/tests/admin_filters/tests.py @@ -229,15 +229,15 @@ class EmployeeAdmin(ModelAdmin): class DepartmentFilterEmployeeAdmin(EmployeeAdmin): - list_filter = [DepartmentListFilterLookupWithNonStringValue, ] + list_filter = [DepartmentListFilterLookupWithNonStringValue] class DepartmentFilterUnderscoredEmployeeAdmin(EmployeeAdmin): - list_filter = [DepartmentListFilterLookupWithUnderscoredParameter, ] + list_filter = [DepartmentListFilterLookupWithUnderscoredParameter] class DepartmentFilterDynamicValueBookAdmin(EmployeeAdmin): - list_filter = [DepartmentListFilterLookupWithDynamicValue, ] + list_filter = [DepartmentListFilterLookupWithDynamicValue] class BookmarkAdminGenericRelation(ModelAdmin): diff --git a/tests/admin_ordering/models.py b/tests/admin_ordering/models.py index b8098b9bcc..fbddeaa283 100644 --- a/tests/admin_ordering/models.py +++ b/tests/admin_ordering/models.py @@ -27,7 +27,7 @@ class SongInlineDefaultOrdering(admin.StackedInline): class SongInlineNewOrdering(admin.StackedInline): model = Song - ordering = ('duration', ) + ordering = ('duration',) class DynOrderingBandAdmin(admin.ModelAdmin): diff --git a/tests/admin_views/admin.py b/tests/admin_views/admin.py index 2c58baea7a..1e4124fca5 100644 --- a/tests/admin_views/admin.py +++ b/tests/admin_views/admin.py @@ -568,7 +568,7 @@ class StoryForm(forms.ModelForm): class StoryAdmin(admin.ModelAdmin): list_display = ('id', 'title', 'content') list_display_links = ('title',) # 'id' not in list_display_links - list_editable = ('content', ) + list_editable = ('content',) form = StoryForm ordering = ['-id'] @@ -576,7 +576,7 @@ class StoryAdmin(admin.ModelAdmin): class OtherStoryAdmin(admin.ModelAdmin): list_display = ('id', 'title', 'content') list_display_links = ('title', 'id') # 'id' in list_display_links - list_editable = ('content', ) + list_editable = ('content',) ordering = ['-id'] @@ -748,7 +748,7 @@ def callable_on_unknown(obj): class AttributeErrorRaisingAdmin(admin.ModelAdmin): - list_display = [callable_on_unknown, ] + list_display = [callable_on_unknown] class CustomManagerAdmin(admin.ModelAdmin): diff --git a/tests/check_framework/test_security.py b/tests/check_framework/test_security.py index 370fca533b..cfc90f95e9 100644 --- a/tests/check_framework/test_security.py +++ b/tests/check_framework/test_security.py @@ -518,6 +518,6 @@ class CheckAllowedHostsTest(SimpleTestCase): def test_allowed_hosts_empty(self): self.assertEqual(self.func(None), [base.W020]) - @override_settings(ALLOWED_HOSTS=['.example.com', ]) + @override_settings(ALLOWED_HOSTS=['.example.com']) def test_allowed_hosts_set(self): self.assertEqual(self.func(None), []) diff --git a/tests/check_framework/tests.py b/tests/check_framework/tests.py index abb4298c65..061ead9d23 100644 --- a/tests/check_framework/tests.py +++ b/tests/check_framework/tests.py @@ -30,10 +30,10 @@ class SystemCheckFrameworkTests(SimpleTestCase): return [1, 2, 3] def f2(**kwargs): - return [4, ] + return [4] def f3(**kwargs): - return [5, ] + return [5] calls = [0] diff --git a/tests/flatpages_tests/test_forms.py b/tests/flatpages_tests/test_forms.py index 9ed678fdc2..2a4bb0679a 100644 --- a/tests/flatpages_tests/test_forms.py +++ b/tests/flatpages_tests/test_forms.py @@ -6,7 +6,7 @@ from django.test import TestCase, modify_settings, override_settings from django.utils import translation -@modify_settings(INSTALLED_APPS={'append': ['django.contrib.flatpages', ]}) +@modify_settings(INSTALLED_APPS={'append': ['django.contrib.flatpages']}) @override_settings(SITE_ID=1) class FlatpageAdminFormTests(TestCase): diff --git a/tests/gis_tests/gdal_tests/test_raster.py b/tests/gis_tests/gdal_tests/test_raster.py index 219600fb6a..936f9f1204 100644 --- a/tests/gis_tests/gdal_tests/test_raster.py +++ b/tests/gis_tests/gdal_tests/test_raster.py @@ -256,7 +256,7 @@ class GDALRasterTests(SimpleTestCase): if numpy: result = result.flatten().tolist() # All band data is equal to nodata value. - self.assertEqual(result, [23, ] * 4) + self.assertEqual(result, [23] * 4) def test_set_nodata_none_on_raster_creation(self): if GDAL_VERSION < (2, 1): @@ -299,7 +299,7 @@ class GDALRasterTests(SimpleTestCase): }) # Set metadata on raster and on a band. metadata = { - 'DEFAULT': {'OWNER': 'Django', 'VERSION': '1.0', 'AREA_OR_POINT': 'Point', }, + 'DEFAULT': {'OWNER': 'Django', 'VERSION': '1.0', 'AREA_OR_POINT': 'Point'}, } source.metadata = metadata source.bands[0].metadata = metadata @@ -307,13 +307,13 @@ class GDALRasterTests(SimpleTestCase): self.assertEqual(source.bands[0].metadata['DEFAULT'], metadata['DEFAULT']) # Update metadata on raster. metadata = { - 'DEFAULT': {'VERSION': '2.0', }, + 'DEFAULT': {'VERSION': '2.0'}, } source.metadata = metadata self.assertEqual(source.metadata['DEFAULT']['VERSION'], '2.0') # Remove metadata on raster. metadata = { - 'DEFAULT': {'OWNER': None, }, + 'DEFAULT': {'OWNER': None}, } source.metadata = metadata self.assertNotIn('OWNER', source.metadata['DEFAULT']) diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py index 955bb6c5d2..db8c44d758 100644 --- a/tests/gis_tests/geos_tests/test_geos.py +++ b/tests/gis_tests/geos_tests/test_geos.py @@ -1264,7 +1264,7 @@ class GEOSTest(SimpleTestCase, TestDataMixin): mp = MultiPolygon(p1, p2) path, args, kwargs = mp.deconstruct() self.assertEqual(path, 'django.contrib.gis.geos.collections.MultiPolygon') - self.assertEqual(args, (p1, p2, )) + self.assertEqual(args, (p1, p2)) self.assertEqual(kwargs, {}) poly = Polygon(((0, 0), (0, 1), (1, 1), (0, 0))) diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py index 752940b614..5fb710faf8 100644 --- a/tests/i18n/tests.py +++ b/tests/i18n/tests.py @@ -1142,7 +1142,7 @@ class MiscTests(SimpleTestCase): ('en; q=1.0, * ; q=0.5', [('en', 1.0), ('*', 0.5)]), # Bad headers ('en-gb;q=1.0000', []), - ('en;q=0.1234', [], ), + ('en;q=0.1234', []), ('en;q=.2', []), ('abcdefghi-au', []), ('**', []), diff --git a/tests/lookup/models.py b/tests/lookup/models.py index d58d863885..ef5e7dfb0e 100644 --- a/tests/lookup/models.py +++ b/tests/lookup/models.py @@ -19,7 +19,7 @@ class Author(models.Model): name = models.CharField(max_length=100) class Meta: - ordering = ('name', ) + ordering = ('name',) class Article(models.Model): @@ -40,7 +40,7 @@ class Tag(models.Model): name = models.CharField(max_length=100) class Meta: - ordering = ('name', ) + ordering = ('name',) class NulledTextField(models.TextField): diff --git a/tests/m2m_through/tests.py b/tests/m2m_through/tests.py index 5be6ef72d0..930f5e848c 100644 --- a/tests/m2m_through/tests.py +++ b/tests/m2m_through/tests.py @@ -87,7 +87,7 @@ class M2mThroughTests(TestCase): self.assertQuerysetEqual( self.rock.members.all(), - ['Jim', ], + ['Jim'], attrgetter("name") ) @@ -156,7 +156,7 @@ class M2mThroughTests(TestCase): self.assertQuerysetEqual( self.bob.group_set.all(), - ['Rock', ], + ['Rock'], attrgetter('name') ) @@ -192,7 +192,7 @@ class M2mThroughTests(TestCase): self.assertQuerysetEqual( Group.objects.filter(members__name='Bob'), - ['Roll', ], + ['Roll'], attrgetter("name") ) diff --git a/tests/migrations/test_autodetector.py b/tests/migrations/test_autodetector.py index a111b8f70d..bc828203f8 100644 --- a/tests/migrations/test_autodetector.py +++ b/tests/migrations/test_autodetector.py @@ -237,13 +237,13 @@ class AutodetectorTests(TestCase): author_proxy_options = ModelState("testapp", "AuthorProxy", [], { "proxy": True, "verbose_name": "Super Author", - }, ("testapp.author", )) - author_proxy_notproxy = ModelState("testapp", "AuthorProxy", [], {}, ("testapp.author", )) - author_proxy_third = ModelState("thirdapp", "AuthorProxy", [], {"proxy": True}, ("testapp.author", )) - author_proxy_third_notproxy = ModelState("thirdapp", "AuthorProxy", [], {}, ("testapp.author", )) - author_proxy_proxy = ModelState("testapp", "AAuthorProxyProxy", [], {"proxy": True}, ("testapp.authorproxy", )) - author_unmanaged = ModelState("testapp", "AuthorUnmanaged", [], {"managed": False}, ("testapp.author", )) - author_unmanaged_managed = ModelState("testapp", "AuthorUnmanaged", [], {}, ("testapp.author", )) + }, ("testapp.author",)) + author_proxy_notproxy = ModelState("testapp", "AuthorProxy", [], {}, ("testapp.author",)) + author_proxy_third = ModelState("thirdapp", "AuthorProxy", [], {"proxy": True}, ("testapp.author",)) + author_proxy_third_notproxy = ModelState("thirdapp", "AuthorProxy", [], {}, ("testapp.author",)) + author_proxy_proxy = ModelState("testapp", "AAuthorProxyProxy", [], {"proxy": True}, ("testapp.authorproxy",)) + author_unmanaged = ModelState("testapp", "AuthorUnmanaged", [], {"managed": False}, ("testapp.author",)) + author_unmanaged_managed = ModelState("testapp", "AuthorUnmanaged", [], {}, ("testapp.author",)) author_unmanaged_default_pk = ModelState("testapp", "Author", [("id", models.AutoField(primary_key=True))]) author_unmanaged_custom_pk = ModelState("testapp", "Author", [ ("pk_field", models.IntegerField(primary_key=True)), @@ -430,14 +430,14 @@ class AutodetectorTests(TestCase): custom_user = ModelState("thirdapp", "CustomUser", [ ("id", models.AutoField(primary_key=True)), ("username", models.CharField(max_length=255)), - ], bases=(AbstractBaseUser, )) + ], bases=(AbstractBaseUser,)) custom_user_no_inherit = ModelState("thirdapp", "CustomUser", [ ("id", models.AutoField(primary_key=True)), ("username", models.CharField(max_length=255)), ]) aardvark = ModelState("thirdapp", "Aardvark", [("id", models.AutoField(primary_key=True))]) aardvark_testapp = ModelState("testapp", "Aardvark", [("id", models.AutoField(primary_key=True))]) - aardvark_based_on_author = ModelState("testapp", "Aardvark", [], bases=("testapp.Author", )) + aardvark_based_on_author = ModelState("testapp", "Aardvark", [], bases=("testapp.Author",)) aardvark_pk_fk_author = ModelState("testapp", "Aardvark", [ ("id", models.OneToOneField("testapp.Author", models.CASCADE, primary_key=True)), ]) @@ -2071,7 +2071,7 @@ class AutodetectorTests(TestCase): tenant = ModelState("a", "Tenant", [ ("id", models.AutoField(primary_key=True)), ("primary_address", models.ForeignKey("b.Address", models.CASCADE))], - bases=(AbstractBaseUser, ) + bases=(AbstractBaseUser,) ) address = ModelState("b", "Address", [ ("id", models.AutoField(primary_key=True)), @@ -2105,7 +2105,7 @@ class AutodetectorTests(TestCase): tenant = ModelState("b", "Tenant", [ ("id", models.AutoField(primary_key=True)), ("primary_address", models.ForeignKey("a.Address", models.CASCADE))], - bases=(AbstractBaseUser, ) + bases=(AbstractBaseUser,) ) changes = self.get_changes([], [address, tenant]) # Right number/type of migrations? diff --git a/tests/migrations/test_executor.py b/tests/migrations/test_executor.py index fdbc724faf..71447478ad 100644 --- a/tests/migrations/test_executor.py +++ b/tests/migrations/test_executor.py @@ -554,14 +554,14 @@ class ExecutorTests(MigrationTestBase): migrations = executor.loader.graph.nodes expected = [ - ("render_start", ), - ("render_success", ), + ("render_start",), + ("render_success",), ("apply_start", migrations['migrations', '0001_initial'], False), ("apply_success", migrations['migrations', '0001_initial'], False), ("apply_start", migrations['migrations', '0002_second'], False), ("apply_success", migrations['migrations', '0002_second'], False), - ("render_start", ), - ("render_success", ), + ("render_start",), + ("render_success",), ("unapply_start", migrations['migrations', '0002_second'], False), ("unapply_success", migrations['migrations', '0002_second'], False), ("unapply_start", migrations['migrations', '0001_initial'], False), diff --git a/tests/migrations/test_graph.py b/tests/migrations/test_graph.py index 799ee916fc..d4ab3685a9 100644 --- a/tests/migrations/test_graph.py +++ b/tests/migrations/test_graph.py @@ -147,7 +147,7 @@ class GraphTests(SimpleTestCase): graph.add_dependency("app_b.0001", ("app_b", "0001"), ("app_a", "0003")) # Test whole graph with self.assertRaises(CircularDependencyError): - graph.forwards_plan(("app_a", "0003"), ) + graph.forwards_plan(("app_a", "0003")) def test_circular_graph_2(self): graph = MigrationGraph() diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py index d953ea20aa..fb429e19cf 100644 --- a/tests/migrations/test_operations.py +++ b/tests/migrations/test_operations.py @@ -409,7 +409,7 @@ class OperationTests(OperationTestBase): "ProxyPony", [], options={"proxy": True}, - bases=("test_crprmo.Pony", ), + bases=("test_crprmo.Pony",), ) self.assertEqual(operation.describe(), "Create proxy model ProxyPony") new_state = project_state.clone() @@ -443,7 +443,7 @@ class OperationTests(OperationTestBase): "UnmanagedPony", [], options={"proxy": True}, - bases=("test_crummo.Pony", ), + bases=("test_crummo.Pony",), ) self.assertEqual(operation.describe(), "Create proxy model UnmanagedPony") new_state = project_state.clone() diff --git a/tests/migrations/test_optimizer.py b/tests/migrations/test_optimizer.py index 40cc50b33b..0a13ef290f 100644 --- a/tests/migrations/test_optimizer.py +++ b/tests/migrations/test_optimizer.py @@ -243,7 +243,7 @@ class OptimizerTests(SimpleTestCase): self.assertDoesNotOptimize( [ migrations.CreateModel("Foo", [("name", models.CharField(max_length=255))]), - migrations.CreateModel("Bar", [("size", models.IntegerField())], bases=("testapp.Foo", )), + migrations.CreateModel("Bar", [("size", models.IntegerField())], bases=("testapp.Foo",)), migrations.DeleteModel("Foo"), ], ) @@ -252,11 +252,11 @@ class OptimizerTests(SimpleTestCase): self.assertOptimizesTo( [ migrations.CreateModel("Foo", [("name", models.CharField(max_length=255))]), - migrations.CreateModel("Bar", [("size", models.IntegerField())], bases=("testapp.Foo", )), + migrations.CreateModel("Bar", [("size", models.IntegerField())], bases=("testapp.Foo",)), migrations.DeleteModel("Foo"), ], [ - migrations.CreateModel("Bar", [("size", models.IntegerField())], bases=("testapp.Foo", )), + migrations.CreateModel("Bar", [("size", models.IntegerField())], bases=("testapp.Foo",)), ], app_label="otherapp", ) @@ -264,7 +264,7 @@ class OptimizerTests(SimpleTestCase): self.assertDoesNotOptimize( [ migrations.CreateModel("Foo", [("name", models.CharField(max_length=255))]), - migrations.CreateModel("Bar", [("size", models.IntegerField())], bases=("testapp.Foo", )), + migrations.CreateModel("Bar", [("size", models.IntegerField())], bases=("testapp.Foo",)), migrations.DeleteModel("Foo"), ], app_label="testapp", diff --git a/tests/migrations/test_state.py b/tests/migrations/test_state.py index 9110e8d447..255e14beff 100644 --- a/tests/migrations/test_state.py +++ b/tests/migrations/test_state.py @@ -129,7 +129,7 @@ class StateTests(SimpleTestCase): author_state.options, {"unique_together": {("name", "bio")}, "index_together": {("bio", "age")}, "indexes": []} ) - self.assertEqual(author_state.bases, (models.Model, )) + self.assertEqual(author_state.bases, (models.Model,)) self.assertEqual(book_state.app_label, "migrations") self.assertEqual(book_state.name, "Book") @@ -141,18 +141,18 @@ class StateTests(SimpleTestCase): book_state.options, {"verbose_name": "tome", "db_table": "test_tome", "indexes": [book_index]}, ) - self.assertEqual(book_state.bases, (models.Model, )) + self.assertEqual(book_state.bases, (models.Model,)) self.assertEqual(author_proxy_state.app_label, "migrations") self.assertEqual(author_proxy_state.name, "AuthorProxy") self.assertEqual(author_proxy_state.fields, []) self.assertEqual(author_proxy_state.options, {"proxy": True, "ordering": ["name"], "indexes": []}) - self.assertEqual(author_proxy_state.bases, ("migrations.author", )) + self.assertEqual(author_proxy_state.bases, ("migrations.author",)) self.assertEqual(sub_author_state.app_label, "migrations") self.assertEqual(sub_author_state.name, "SubAuthor") self.assertEqual(len(sub_author_state.fields), 2) - self.assertEqual(sub_author_state.bases, ("migrations.author", )) + self.assertEqual(sub_author_state.bases, ("migrations.author",)) # The default manager is used in migrations self.assertEqual([name for name, mgr in food_state.managers], ['food_mgr']) @@ -1003,7 +1003,7 @@ class ModelStateTests(SimpleTestCase): self.assertIs(author_state.fields[2][1].null, False) self.assertIs(author_state.fields[3][1].null, True) self.assertEqual(author_state.options, {'swappable': 'TEST_SWAPPABLE_MODEL', 'indexes': []}) - self.assertEqual(author_state.bases, (models.Model, )) + self.assertEqual(author_state.bases, (models.Model,)) self.assertEqual(author_state.managers, []) @override_settings(TEST_SWAPPABLE_MODEL='migrations.SomeFakeModel') @@ -1049,7 +1049,7 @@ class ModelStateTests(SimpleTestCase): station_state.options, {'abstract': False, 'swappable': 'TEST_SWAPPABLE_MODEL', 'indexes': []} ) - self.assertEqual(station_state.bases, ('migrations.searchablelocation', )) + self.assertEqual(station_state.bases, ('migrations.searchablelocation',)) self.assertEqual(station_state.managers, []) @override_settings(TEST_SWAPPABLE_MODEL='migrations.SomeFakeModel') diff --git a/tests/model_formsets_regress/tests.py b/tests/model_formsets_regress/tests.py index 26ab9c1ae9..ec58a6382a 100644 --- a/tests/model_formsets_regress/tests.py +++ b/tests/model_formsets_regress/tests.py @@ -291,7 +291,7 @@ class FormsetTests(TestCase): data = {'test-TOTAL_FORMS': '1', 'test-INITIAL_FORMS': '0', 'test-MAX_NUM_FORMS': '', - 'test-0-name': 'Random Place', } + 'test-0-name': 'Random Place'} with self.assertNumQueries(1): formset = Formset(data, prefix="test") formset.save() diff --git a/tests/modeladmin/test_checks.py b/tests/modeladmin/test_checks.py index 5559a8fe3c..f268fead15 100644 --- a/tests/modeladmin/test_checks.py +++ b/tests/modeladmin/test_checks.py @@ -625,7 +625,7 @@ class ListFilterTests(CheckTestCase): return 'awesomeness' def get_choices(self, request): - return (('bit', 'A bit awesome'), ('very', 'Very awesome'), ) + return (('bit', 'A bit awesome'), ('very', 'Very awesome')) def get_queryset(self, cl, qs): return qs @@ -655,7 +655,7 @@ class ListFilterTests(CheckTestCase): return 'awesomeness' def get_choices(self, request): - return (('bit', 'A bit awesome'), ('very', 'Very awesome'), ) + return (('bit', 'A bit awesome'), ('very', 'Very awesome')) def get_queryset(self, cl, qs): return qs @@ -1248,10 +1248,10 @@ class AutocompleteFieldsTests(CheckTestCase): def test_autocomplete_is_onetoone(self): class UserAdmin(ModelAdmin): - search_fields = ('name', ) + search_fields = ('name',) class Admin(ModelAdmin): - autocomplete_fields = ('best_friend', ) + autocomplete_fields = ('best_friend',) site = AdminSite() site.register(User, UserAdmin) diff --git a/tests/null_fk_ordering/models.py b/tests/null_fk_ordering/models.py index a7938cec54..368a47044e 100644 --- a/tests/null_fk_ordering/models.py +++ b/tests/null_fk_ordering/models.py @@ -18,10 +18,10 @@ class Article(models.Model): author = models.ForeignKey(Author, models.SET_NULL, null=True) def __str__(self): - return 'Article titled: %s' % (self.title, ) + return 'Article titled: %s' % self.title class Meta: - ordering = ['author__name', ] + ordering = ['author__name'] # These following 4 models represent a far more complex ordering case. diff --git a/tests/queries/models.py b/tests/queries/models.py index c3f5125498..902fd55c05 100644 --- a/tests/queries/models.py +++ b/tests/queries/models.py @@ -579,7 +579,7 @@ class Order(models.Model): id = models.IntegerField(primary_key=True) class Meta: - ordering = ('pk', ) + ordering = ('pk',) def __str__(self): return '%s' % self.pk @@ -590,7 +590,7 @@ class OrderItem(models.Model): status = models.IntegerField() class Meta: - ordering = ('pk', ) + ordering = ('pk',) def __str__(self): return '%s' % self.pk diff --git a/tests/queries/tests.py b/tests/queries/tests.py index 668b07361a..ec50194e3a 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -2351,11 +2351,11 @@ class QuerySetSupportsPythonIdioms(TestCase): def test_slicing_cannot_filter_queryset_once_sliced(self): with self.assertRaisesMessage(AssertionError, "Cannot filter a query once a slice has been taken."): - Article.objects.all()[0:5].filter(id=1, ) + Article.objects.all()[0:5].filter(id=1) def test_slicing_cannot_reorder_queryset_once_sliced(self): with self.assertRaisesMessage(AssertionError, "Cannot reorder a query once a slice has been taken."): - Article.objects.all()[0:5].order_by('id', ) + Article.objects.all()[0:5].order_by('id') def test_slicing_cannot_combine_queries_once_sliced(self): with self.assertRaisesMessage(AssertionError, "Cannot combine queries once a slice has been taken."): @@ -3581,7 +3581,7 @@ class RelatedLookupTypeTests(TestCase): When passing proxy model objects, child objects, or parent objects, lookups work fine. """ - out_a = ['<ObjectA: oa>', ] + out_a = ['<ObjectA: oa>'] out_b = ['<ObjectB: ob>', '<ObjectB: pob>'] out_c = ['<ObjectC: >'] diff --git a/tests/queryset_pickle/tests.py b/tests/queryset_pickle/tests.py index 27f509a9c1..7eec47379c 100644 --- a/tests/queryset_pickle/tests.py +++ b/tests/queryset_pickle/tests.py @@ -102,7 +102,7 @@ class PickleabilityTestCase(TestCase): def test_model_pickle_dynamic(self): class Meta: proxy = True - dynclass = type("DynamicEventSubclass", (Event, ), {'Meta': Meta, '__module__': Event.__module__}) + dynclass = type("DynamicEventSubclass", (Event,), {'Meta': Meta, '__module__': Event.__module__}) original = dynclass(pk=1) dumped = pickle.dumps(original) reloaded = pickle.loads(dumped) diff --git a/tests/staticfiles_tests/test_forms.py b/tests/staticfiles_tests/test_forms.py index 4666520bc1..ec9f069ed8 100644 --- a/tests/staticfiles_tests/test_forms.py +++ b/tests/staticfiles_tests/test_forms.py @@ -13,7 +13,7 @@ class StaticTestStorage(storage.StaticFilesStorage): @override_settings( STATIC_URL='http://media.example.com/static/', - INSTALLED_APPS=('django.contrib.staticfiles', ), + INSTALLED_APPS=('django.contrib.staticfiles',), STATICFILES_STORAGE='staticfiles_tests.test_forms.StaticTestStorage', ) class StaticFilesFormsMediaTestCase(SimpleTestCase): diff --git a/tests/validation/test_unique.py b/tests/validation/test_unique.py index 002e568ae9..88eb94a54e 100644 --- a/tests/validation/test_unique.py +++ b/tests/validation/test_unique.py @@ -28,7 +28,7 @@ class GetUniqueCheckTests(unittest.TestCase): self.assertEqual( ([(UniqueTogetherModel, ('ifield', 'cfield')), (UniqueTogetherModel, ('ifield', 'efield')), - (UniqueTogetherModel, ('id',)), ], + (UniqueTogetherModel, ('id',))], []), m._get_unique_checks() ) |
