summaryrefslogtreecommitdiff
path: root/tests/cache
diff options
context:
space:
mode:
authorSimon Charette <charettes@users.noreply.github.com>2017-01-19 02:39:46 -0500
committerClaude Paroz <claude@2xlibre.net>2017-01-19 08:39:46 +0100
commitcecc079168e8669138728d31611ff3a1e7eb3a9f (patch)
tree2415083d44f84c6f206930fc689a8c0e50a98caa /tests/cache
parenta5563963397aeee30c32e3c1dab31bfe453ca89f (diff)
Refs #23919 -- Stopped inheriting from object to define new style classes.
Diffstat (limited to 'tests/cache')
-rw-r--r--tests/cache/closeable_cache.py2
-rw-r--r--tests/cache/liberal_backend.py2
-rw-r--r--tests/cache/tests.py10
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/cache/closeable_cache.py b/tests/cache/closeable_cache.py
index 1ac868dde9..a9e99a62cd 100644
--- a/tests/cache/closeable_cache.py
+++ b/tests/cache/closeable_cache.py
@@ -1,7 +1,7 @@
from django.core.cache.backends.locmem import LocMemCache
-class CloseHookMixin(object):
+class CloseHookMixin:
closed = False
def close(self, **kwargs):
diff --git a/tests/cache/liberal_backend.py b/tests/cache/liberal_backend.py
index 339066b0ff..93dc39a0d7 100644
--- a/tests/cache/liberal_backend.py
+++ b/tests/cache/liberal_backend.py
@@ -1,7 +1,7 @@
from django.core.cache.backends.locmem import LocMemCache
-class LiberalKeyValidationMixin(object):
+class LiberalKeyValidationMixin:
def validate_key(self, key):
pass
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index dd886cd11b..bfceff9b02 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -56,12 +56,12 @@ class C:
return 24
-class Unpicklable(object):
+class Unpicklable:
def __getstate__(self):
raise pickle.PickleError()
-class UnpicklableType(object):
+class UnpicklableType:
# Unpicklable using the default pickling protocol on Python 2.
__slots__ = 'a',
@@ -251,7 +251,7 @@ def caches_setting_for_tests(base=None, exclude=None, **params):
return setting
-class BaseCacheTests(object):
+class BaseCacheTests:
# A common set of tests to apply to all cache backends
def setUp(self):
@@ -1010,7 +1010,7 @@ class DBCacheWithTimeZoneTests(DBCacheTests):
pass
-class DBCacheRouter(object):
+class DBCacheRouter:
"""A router that puts the cache table on the 'other' database."""
def db_for_read(self, model, **hints):
@@ -1061,7 +1061,7 @@ class CreateCacheTableForDBCacheTests(TestCase):
verbosity=0, interactive=False)
-class PicklingSideEffect(object):
+class PicklingSideEffect:
def __init__(self, cache):
self.cache = cache