mirror of
https://github.com/django/django.git
synced 2025-07-28 15:44:20 +00:00
Fixed #7967 -- Make sure the __contains__ method in the cache backends call the
right has_key() method for the subclass. Patch from Marty Alchin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
f49c5c23f9
commit
6f16b5bad2
2 changed files with 12 additions and 1 deletions
4
tests/regressiontests/cache/tests.py
vendored
4
tests/regressiontests/cache/tests.py
vendored
|
@ -56,11 +56,15 @@ class Cache(unittest.TestCase):
|
|||
cache.set("hello1", "goodbye1")
|
||||
self.assertEqual(cache.has_key("hello1"), True)
|
||||
self.assertEqual(cache.has_key("goodbye1"), False)
|
||||
cache.set("empty", 'fred')
|
||||
self.assertEqual(cache.has_key("empty"), True)
|
||||
|
||||
def test_in(self):
|
||||
cache.set("hello2", "goodbye2")
|
||||
self.assertEqual("hello2" in cache, True)
|
||||
self.assertEqual("goodbye2" in cache, False)
|
||||
cache.set("empty", 'fred')
|
||||
self.assertEqual("empty" in cache, True)
|
||||
|
||||
def test_data_types(self):
|
||||
stuff = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue