diff options
| author | Tim Graham <timograham@gmail.com> | 2015-01-28 07:35:27 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-06 08:16:28 -0500 |
| commit | 0ed7d155635da9f79d4dd67e4889087d3673c6da (patch) | |
| tree | cf5c59b563f01774f32e20b3af8cb24a387fdc4d /tests/cache | |
| parent | 388d986b8a6bb1363dab9f53ea435dff4dfe92cb (diff) | |
Sorted imports with isort; refs #23860.
Diffstat (limited to 'tests/cache')
| -rw-r--r-- | tests/cache/models.py | 3 | ||||
| -rw-r--r-- | tests/cache/tests.py | 35 |
2 files changed, 20 insertions, 18 deletions
diff --git a/tests/cache/models.py b/tests/cache/models.py index 4fccbb664b..349fd87473 100644 --- a/tests/cache/models.py +++ b/tests/cache/models.py @@ -1,6 +1,5 @@ -from django.utils import timezone - from django.db import models +from django.utils import timezone def expensive_calculation(): diff --git a/tests/cache/tests.py b/tests/cache/tests.py index c17ef12ae0..c6e76c417c 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -4,9 +4,9 @@ # Uses whatever cache backend is set in the test settings file. from __future__ import unicode_literals +import copy import os import re -import copy import shutil import tempfile import threading @@ -15,36 +15,39 @@ import unittest import warnings from django.conf import settings -from django.core import management -from django.core import signals -from django.core.cache import cache, caches, CacheKeyWarning, DEFAULT_CACHE_ALIAS -from django.db import connection, connections, transaction +from django.core import management, signals +from django.core.cache import ( + DEFAULT_CACHE_ALIAS, CacheKeyWarning, cache, caches, +) from django.core.cache.utils import make_template_fragment_key +from django.db import connection, connections, transaction from django.http import HttpRequest, HttpResponse, StreamingHttpResponse -from django.middleware.cache import (FetchFromCacheMiddleware, - UpdateCacheMiddleware, CacheMiddleware) +from django.middleware.cache import ( + CacheMiddleware, FetchFromCacheMiddleware, UpdateCacheMiddleware, +) from django.middleware.csrf import CsrfViewMiddleware from django.template import engines from django.template.context_processors import csrf from django.template.response import TemplateResponse -from django.test import (TestCase, TransactionTestCase, RequestFactory, - override_settings) +from django.test import ( + RequestFactory, TestCase, TransactionTestCase, override_settings, +) from django.test.signals import setting_changed -from django.utils import six -from django.utils import timezone -from django.utils import translation -from django.utils.cache import (patch_vary_headers, get_cache_key, - learn_cache_key, patch_cache_control, patch_response_headers) +from django.utils import six, timezone, translation +from django.utils.cache import ( + get_cache_key, learn_cache_key, patch_cache_control, + patch_response_headers, patch_vary_headers, +) from django.utils.encoding import force_text from django.views.decorators.cache import cache_page +from .models import Poll, expensive_calculation + try: # Use the same idiom as in cache backends from django.utils.six.moves import cPickle as pickle except ImportError: import pickle -from .models import Poll, expensive_calculation - # functions/classes for complex data type tests def f(): |
