diff options
Diffstat (limited to 'tests/cache')
| -rw-r--r-- | tests/cache/tests.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py index caeb8a47df..3bf39e2476 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -3,6 +3,7 @@ import copy import io import os +import pickle import re import shutil import tempfile @@ -33,7 +34,7 @@ from django.test import ( ignore_warnings, mock, override_settings, ) from django.test.signals import setting_changed -from django.utils import six, timezone, translation +from django.utils import timezone, translation from django.utils.cache import ( get_cache_key, learn_cache_key, patch_cache_control, patch_response_headers, patch_vary_headers, @@ -44,11 +45,6 @@ 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 - # functions/classes for complex data type tests def f(): @@ -978,7 +974,7 @@ class DBCacheTests(BaseCacheTests, TransactionTestCase): self._perform_cull_test(caches['zero_cull'], 50, 18) def test_second_call_doesnt_crash(self): - out = six.StringIO() + out = io.StringIO() management.call_command('createcachetable', stdout=out) self.assertEqual(out.getvalue(), "Cache table 'test cache table' already exists.\n" * len(settings.CACHES)) @@ -988,7 +984,7 @@ class DBCacheTests(BaseCacheTests, TransactionTestCase): LOCATION='createcachetable_dry_run_mode' )) def test_createcachetable_dry_run_mode(self): - out = six.StringIO() + out = io.StringIO() management.call_command('createcachetable', dry_run=True, stdout=out) output = out.getvalue() self.assertTrue(output.startswith("CREATE TABLE")) @@ -999,7 +995,7 @@ class DBCacheTests(BaseCacheTests, TransactionTestCase): specifying the table name). """ self.drop_table() - out = six.StringIO() + out = io.StringIO() management.call_command( 'createcachetable', 'test cache table', |
