From ebf34c3cdcd2c75349c60a064427ac255958bf9b Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Wed, 25 Jan 2017 15:14:05 +0100 Subject: Removed unused variables that are overwritten. --- tests/bulk_create/tests.py | 2 -- tests/migrations/test_base.py | 2 +- tests/urlpatterns_reverse/tests.py | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/bulk_create/tests.py b/tests/bulk_create/tests.py index 65d0f9ba8c..97a8f82117 100644 --- a/tests/bulk_create/tests.py +++ b/tests/bulk_create/tests.py @@ -206,7 +206,6 @@ class BulkCreateTests(TestCase): @skipUnlessDBFeature('can_return_ids_from_bulk_insert') def test_set_pk_and_insert_single_item(self): - countries = [] with self.assertNumQueries(1): countries = Country.objects.bulk_create([self.data[0]]) self.assertEqual(len(countries), 1) @@ -214,7 +213,6 @@ class BulkCreateTests(TestCase): @skipUnlessDBFeature('can_return_ids_from_bulk_insert') def test_set_pk_and_query_efficiency(self): - countries = [] with self.assertNumQueries(1): countries = Country.objects.bulk_create(self.data) self.assertEqual(len(countries), 4) diff --git a/tests/migrations/test_base.py b/tests/migrations/test_base.py index 7f7f96c013..007c7c0ba9 100644 --- a/tests/migrations/test_base.py +++ b/tests/migrations/test_base.py @@ -77,7 +77,7 @@ class MigrationTestBase(TransactionTestCase): ), ) - def assertFKNotExists(self, table, columns, to, value=True): + def assertFKNotExists(self, table, columns, to): return self.assertFKExists(table, columns, to, False) @contextmanager diff --git a/tests/urlpatterns_reverse/tests.py b/tests/urlpatterns_reverse/tests.py index a1241b2fab..b2d7e1ad38 100644 --- a/tests/urlpatterns_reverse/tests.py +++ b/tests/urlpatterns_reverse/tests.py @@ -426,7 +426,6 @@ class ResolverTests(SimpleTestCase): e = cm.exception # make sure we at least matched the root ('/') url resolver: self.assertIn('tried', e.args[0]) - tried = e.args[0]['tried'] self.assertEqual( len(e.args[0]['tried']), len(url_types_names), -- cgit v1.3