1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Removed unused local variables in tests.

This commit is contained in:
Tim Graham
2013-10-19 08:31:38 -04:00
parent 5f52590368
commit 96d1d4e292
72 changed files with 309 additions and 339 deletions

View File

@@ -51,7 +51,7 @@ class GetOrCreateTests(TestCase):
# If you specify an existing primary key, but different other fields,
# then you will get an error and data will not be updated.
m = ManualPrimaryKeyTest.objects.create(id=1, data="Original")
ManualPrimaryKeyTest.objects.create(id=1, data="Original")
self.assertRaises(IntegrityError,
ManualPrimaryKeyTest.objects.get_or_create, id=1, data="Different"
)
@@ -63,7 +63,7 @@ class GetOrCreateTests(TestCase):
# the actual traceback. Refs #16340.
try:
ManualPrimaryKeyTest.objects.get_or_create(id=1, data="Different")
except IntegrityError as e:
except IntegrityError:
formatted_traceback = traceback.format_exc()
self.assertIn(str('obj.save'), formatted_traceback)
@@ -193,6 +193,6 @@ class UpdateOrCreateTests(TestCase):
# the actual traceback. Refs #16340.
try:
ManualPrimaryKeyTest.objects.update_or_create(id=1, data="Different")
except IntegrityError as e:
except IntegrityError:
formatted_traceback = traceback.format_exc()
self.assertIn('obj.save', formatted_traceback)