Kaydet (Commit) 05239180 authored tarafından Adam Chainz's avatar Adam Chainz Kaydeden (comit) Tim Graham

Removed unnecessary DBCacheTests.test_clear_commits_transaction test.

Was added in 44164c5c but the
transaction.commit_unless_managed() line was removed in
ba5138b1; thus the test does nothing
but check that clear() runs.
üst 73df1040
......@@ -20,7 +20,7 @@ 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.db import connection, connections
from django.http import HttpRequest, HttpResponse, StreamingHttpResponse
from django.middleware.cache import (
CacheMiddleware, FetchFromCacheMiddleware, UpdateCacheMiddleware,
......@@ -971,13 +971,6 @@ class DBCacheTests(BaseCacheTests, TransactionTestCase):
self.assertEqual(out.getvalue(),
"Cache table 'test cache table' created.\n")
def test_clear_commits_transaction(self):
# Ensure the database transaction is committed (#19896)
cache.set("key1", "spam")
cache.clear()
transaction.rollback()
self.assertIsNone(cache.get("key1"))
@override_settings(USE_TZ=True)
class DBCacheWithTimeZoneTests(DBCacheTests):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment