diff options
| author | Tim Graham <timograham@gmail.com> | 2013-10-19 08:31:38 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-10-19 08:31:38 -0400 |
| commit | 96d1d4e29275f4f5900f0725975d2ad0a4d05816 (patch) | |
| tree | 17b846e3b77f68fbb3b1dc7a2ff413f574c62ce1 /tests/utils_tests | |
| parent | 5f52590368063fc8284e23be492d83ba751f66bf (diff) | |
Removed unused local variables in tests.
Diffstat (limited to 'tests/utils_tests')
| -rw-r--r-- | tests/utils_tests/test_datastructures.py | 2 | ||||
| -rw-r--r-- | tests/utils_tests/test_decorators.py | 2 | ||||
| -rw-r--r-- | tests/utils_tests/test_simplelazyobject.py | 14 |
3 files changed, 8 insertions, 10 deletions
diff --git a/tests/utils_tests/test_datastructures.py b/tests/utils_tests/test_datastructures.py index 4908957a19..ca89e8541d 100644 --- a/tests/utils_tests/test_datastructures.py +++ b/tests/utils_tests/test_datastructures.py @@ -148,8 +148,6 @@ class MergeDictTests(IgnorePendingDeprecationWarningsMixin, SimpleTestCase): d3 = {'chris3':'cool3', 'camri3':'cute3', 'cotton3':'adorable3', 'tulip3':'snuggable3'} - d4 = {'twoofme': 'secondone'} - md = MergeDict(d1, d2, d3) self.assertEqual(md['chris'], 'cool') diff --git a/tests/utils_tests/test_decorators.py b/tests/utils_tests/test_decorators.py index 4d503df026..2d8af0a6e9 100644 --- a/tests/utils_tests/test_decorators.py +++ b/tests/utils_tests/test_decorators.py @@ -73,7 +73,7 @@ class DecoratorFromMiddlewareTests(TestCase): return HttpResponse(t.render(Context({}))) request = self.rf.get('/') - response = normal_view(request) + normal_view(request) self.assertTrue(getattr(request, 'process_request_reached', False)) self.assertTrue(getattr(request, 'process_view_reached', False)) # process_template_response must not be called for HttpResponse diff --git a/tests/utils_tests/test_simplelazyobject.py b/tests/utils_tests/test_simplelazyobject.py index 6aac298dd1..072db52e9e 100644 --- a/tests/utils_tests/test_simplelazyobject.py +++ b/tests/utils_tests/test_simplelazyobject.py @@ -69,7 +69,7 @@ class TestUtilsSimpleLazyObject(TestCase): self.assertEqual(empty, x._wrapped) # Second, for an evaluated SimpleLazyObject - name = x.name # evaluate + x.name # evaluate self.assertIsInstance(x._wrapped, _ComplexObject) # __repr__ contains __repr__ of wrapped object self.assertEqual("<SimpleLazyObject: %r>" % x._wrapped, repr(x)) @@ -99,7 +99,7 @@ class TestUtilsSimpleLazyObject(TestCase): self.assertEqual(s2, complex_object()) # Second, for an evaluated SimpleLazyObject - name = s.name # evaluate + s.name # evaluate self.assertIsNot(s._wrapped, empty) s3 = copy.deepcopy(s) self.assertEqual(s3, complex_object()) @@ -186,15 +186,15 @@ class TestUtilsSimpleLazyObjectDjangoTestCase(DjangoTestCase): # This would fail with "TypeError: can't pickle instancemethod objects", # only on Python 2.X. - pickled = pickle.dumps(x) + pickle.dumps(x) # Try the variant protocol levels. - pickled = pickle.dumps(x, 0) - pickled = pickle.dumps(x, 1) - pickled = pickle.dumps(x, 2) + pickle.dumps(x, 0) + pickle.dumps(x, 1) + pickle.dumps(x, 2) if six.PY2: import cPickle # This would fail with "TypeError: expected string or Unicode object, NoneType found". - pickled = cPickle.dumps(x) + cPickle.dumps(x) |
