Django

Code

Show
Ignore:
Timestamp:
07/25/08 22:58:31 (4 months ago)
Author:
mtredinnick
Message:

Fixed #7967 -- Make sure the contains method in the cache backends call the
right has_key() method for the subclass. Patch from Marty Alchin.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/regressiontests/cache/tests.py

    r6887 r8084  
    5757        self.assertEqual(cache.has_key("hello1"), True) 
    5858        self.assertEqual(cache.has_key("goodbye1"), False) 
     59        cache.set("empty", 'fred') 
     60        self.assertEqual(cache.has_key("empty"), True) 
    5961 
    6062    def test_in(self): 
     
    6264        self.assertEqual("hello2" in cache, True) 
    6365        self.assertEqual("goodbye2" in cache, False) 
     66        cache.set("empty", 'fred') 
     67        self.assertEqual("empty" in cache, True) 
    6468 
    6569    def test_data_types(self):