Пример #1
0
 def test_set(self):
     no_cache = NoCache()
     no_cache.set('foo', 'bar')
     no_cache.set('moof', 'baz', timeout=1)
     
     # Use the underlying cache system to verify.
     self.assertEqual(cache.get('foo'), None)
     self.assertEqual(cache.get('moof'), None)
Пример #2
0
    def test_get(self):
        cache.set('foo', 'bar', 60)
        cache.set('moof', 'baz', 1)

        no_cache = NoCache()
        self.assertEqual(no_cache.get('foo'), None)
        self.assertEqual(no_cache.get('moof'), None)
        self.assertEqual(no_cache.get(''), None)
Пример #3
0
 def test_get(self):
     cache.set('foo', 'bar', 60)
     cache.set('moof', 'baz', 1)
     
     no_cache = NoCache()
     self.assertEqual(no_cache.get('foo'), None)
     self.assertEqual(no_cache.get('moof'), None)
     self.assertEqual(no_cache.get(''), None)
Пример #4
0
    def test_set(self):
        no_cache = NoCache()
        no_cache.set('foo', 'bar')
        no_cache.set('moof', 'baz', timeout=1)

        # Use the underlying cache system to verify.
        self.assertEqual(cache.get('foo'), None)
        self.assertEqual(cache.get('moof'), None)