summaryrefslogtreecommitdiff
path: root/tests/get_or_create
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-10-19 08:31:38 -0400
committerTim Graham <timograham@gmail.com>2013-10-19 08:31:38 -0400
commit96d1d4e29275f4f5900f0725975d2ad0a4d05816 (patch)
tree17b846e3b77f68fbb3b1dc7a2ff413f574c62ce1 /tests/get_or_create
parent5f52590368063fc8284e23be492d83ba751f66bf (diff)
Removed unused local variables in tests.
Diffstat (limited to 'tests/get_or_create')
-rw-r--r--tests/get_or_create/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/get_or_create/tests.py b/tests/get_or_create/tests.py
index 9c0d17a4d9..d4aca54c91 100644
--- a/tests/get_or_create/tests.py
+++ b/tests/get_or_create/tests.py
@@ -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)