summaryrefslogtreecommitdiff
path: root/test/unittest_cache.py
diff options
context:
space:
mode:
authorDavid Douard <david.douard@logilab.fr>2012-11-14 17:02:48 +0100
committerDavid Douard <david.douard@logilab.fr>2012-11-14 17:02:48 +0100
commit9fc4653fc67300e02b0d0a0ecd2fb4fe647780ab (patch)
treeae8761455ad3edecb8e59b94972357f6d7159a77 /test/unittest_cache.py
parentd9ae7d4a40d65160de9ff07b69ea880f7fb2040d (diff)
parent1d0f11913a66d5410c65a9c039a1630218b2e3ae (diff)
downloadlogilab-common-9fc4653fc67300e02b0d0a0ecd2fb4fe647780ab.tar.gz
backport stable
Diffstat (limited to 'test/unittest_cache.py')
-rw-r--r--test/unittest_cache.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unittest_cache.py b/test/unittest_cache.py
index c184cca..9b02b39 100644
--- a/test/unittest_cache.py
+++ b/test/unittest_cache.py
@@ -1,5 +1,5 @@
# unit tests for the cache module
-# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
@@ -68,9 +68,9 @@ class CacheTestCase(TestCase):
self.cache[4] = 'foz'
self.cache[5] = 'fuz'
self.cache[6] = 'spam'
- self.assert_(1 not in self.cache,
+ self.assertTrue(1 not in self.cache,
'key 1 has not been suppressed from the cache dictionnary')
- self.assert_(1 not in self.cache._usage,
+ self.assertTrue(1 not in self.cache._usage,
'key 1 has not been suppressed from the cache LRU list')
self.assertEqual(len(self.cache._usage), 5, "lenght of usage list is not 5")
self.assertEqual(self.cache._usage[-1], 6, '6 is not the most recently used key')
@@ -95,8 +95,8 @@ class CacheTestCase(TestCase):
"""
self.cache['foo'] = 'bar'
del self.cache['foo']
- self.assert_('foo' not in self.cache.keys(), "Element 'foo' was not removed cache dictionnary")
- self.assert_('foo' not in self.cache._usage, "Element 'foo' was not removed usage list")
+ self.assertTrue('foo' not in self.cache.keys(), "Element 'foo' was not removed cache dictionnary")
+ self.assertTrue('foo' not in self.cache._usage, "Element 'foo' was not removed usage list")
self.assertItemsEqual(self.cache._usage,
self.cache.keys())# usage list and data keys are different