summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2017-01-25 15:14:05 +0100
committerTim Graham <timograham@gmail.com>2017-01-25 09:15:36 -0500
commitc94cb4f86541d8f76ee27652e214fedd0c0920fe (patch)
tree93603bde283d50a96c0f3a87c92399ca8da55b8b /tests
parenta69fc396e47cea763401eaaab92e11a5343e7d3e (diff)
[1.11.x] Removed unused variables that are overwritten.
Backport of ebf34c3cdcd2c75349c60a064427ac255958bf9b from master
Diffstat (limited to 'tests')
-rw-r--r--tests/bulk_create/tests.py2
-rw-r--r--tests/migrations/test_base.py2
-rw-r--r--tests/urlpatterns_reverse/tests.py1
3 files changed, 1 insertions, 4 deletions
diff --git a/tests/bulk_create/tests.py b/tests/bulk_create/tests.py
index 3378f0010a..2555e66ec6 100644
--- a/tests/bulk_create/tests.py
+++ b/tests/bulk_create/tests.py
@@ -208,7 +208,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)
@@ -216,7 +215,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 bb45972c89..8dbd57a27d 100644
--- a/tests/urlpatterns_reverse/tests.py
+++ b/tests/urlpatterns_reverse/tests.py
@@ -422,7 +422,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),