summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-04-21 12:25:43 +0200
committerTim Graham <timograham@gmail.com>2014-04-21 07:50:50 -0400
commit62eb79fc4cc956b798e5c3a3be96101037ae9cb0 (patch)
tree643d66ea3e9aead998c2efde73ab14b8ccaba6e3 /tests
parent50dddbdfc7489847d55465ad352fc3278b2a9a08 (diff)
[1.7.x] Appeased flake8 2.1.0.
Backport of 428c0bbe1bcd303560d7e96d7d2721ff3fdc0e3f from master
Diffstat (limited to 'tests')
-rw-r--r--tests/cache/tests.py4
-rw-r--r--tests/migrations/test_writer.py2
-rw-r--r--tests/model_inheritance/tests.py2
-rw-r--r--tests/staticfiles_tests/tests.py7
4 files changed, 8 insertions, 7 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index c08a489939..601d5c2b2b 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -1095,8 +1095,8 @@ class MemcachedCacheTests(BaseCacheTests, TestCase):
"cache with python-memcached library not available")
def test_memcached_uses_highest_pickle_version(self):
# Regression test for #19810
- for cache_key, cache in settings.CACHES.items():
- if cache['BACKEND'] == 'django.core.cache.backends.memcached.MemcachedCache':
+ for cache_key, cache_config in settings.CACHES.items():
+ if cache_config['BACKEND'] == 'django.core.cache.backends.memcached.MemcachedCache':
self.assertEqual(caches[cache_key]._cache.pickleProtocol,
pickle.HIGHEST_PROTOCOL)
diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py
index 4d552532d4..6a85ba8ca3 100644
--- a/tests/migrations/test_writer.py
+++ b/tests/migrations/test_writer.py
@@ -160,7 +160,7 @@ class WriterTests(TestCase):
# In order to preserve compatibility with Python 3.2 unicode literals
# prefix shouldn't be added to strings.
tokens = tokenize.generate_tokens(six.StringIO(str(output)).readline)
- for token_type, token_source, (srow, scol), _, line in tokens:
+ for token_type, token_source, (srow, scol), __, line in tokens:
if token_type == tokenize.STRING:
self.assertFalse(
token_source.startswith('u'),
diff --git a/tests/model_inheritance/tests.py b/tests/model_inheritance/tests.py
index 50cdf31b87..15c94c6087 100644
--- a/tests/model_inheritance/tests.py
+++ b/tests/model_inheritance/tests.py
@@ -6,7 +6,7 @@ from django.core.exceptions import FieldError
from django.core.management import call_command
from django.db import connection
from django.test import TestCase
-from django.test.utils import CaptureQueriesContext, override_settings
+from django.test.utils import CaptureQueriesContext
from django.utils import six
from .models import (
diff --git a/tests/staticfiles_tests/tests.py b/tests/staticfiles_tests/tests.py
index 4d2ba30c8c..9d49ab1927 100644
--- a/tests/staticfiles_tests/tests.py
+++ b/tests/staticfiles_tests/tests.py
@@ -848,9 +848,10 @@ class TestDefaultStorageFinder(StaticFilesTestCase, FinderTestCase):
self.find_all = ('media-file.txt', [test_file_path])
-@override_settings(STATICFILES_FINDERS=
- ('django.contrib.staticfiles.finders.FileSystemFinder',),
- STATICFILES_DIRS=[os.path.join(TEST_ROOT, 'project', 'documents')])
+@override_settings(
+ STATICFILES_FINDERS=('django.contrib.staticfiles.finders.FileSystemFinder',),
+ STATICFILES_DIRS=[os.path.join(TEST_ROOT, 'project', 'documents')],
+)
class TestMiscFinder(TestCase):
"""
A few misc finder tests.