summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-04-21 12:25:43 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-04-21 12:27:34 +0200
commit428c0bbe1bcd303560d7e96d7d2721ff3fdc0e3f (patch)
tree474287f4b5e96203f941a6e4f9bb1f90257ccc74 /tests
parentdf3b1a01c7d6326e966fbe13aa149265f4bf9c8f (diff)
Appeased flake8 2.1.0.
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 c3aea981fc..aa6beac0f2 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -1097,8 +1097,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 996e86e130..77179fb79d 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.