diff options
| author | Claude Paroz <claude@2xlibre.net> | 2017-01-07 12:11:46 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-01-18 21:33:28 +0100 |
| commit | 2b281cc35ed9d997614ca3c416928d7fabfef1ad (patch) | |
| tree | d3e73cf44b15139aa9f1f53e398942ba64f5e190 /tests/cache | |
| parent | 7b2f2e74adb36a4334e83130f6abc2f79d395235 (diff) | |
Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
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', |
