--- a/tests/app/soc/cache/test_sidebar.py Wed Jan 28 23:49:45 2009 +0000
+++ b/tests/app/soc/cache/test_sidebar.py Wed Jan 28 23:52:25 2009 +0000
@@ -55,34 +55,35 @@
def testGet(self):
"""Test that get without setting something returns None.
"""
- self.assertEqual(None, sidebar.get())
+
+ self.assertEqual(None, sidebar.get('id', None))
def testGetPut(self):
"""Test that getting after putting gives back what you put in.
"""
- sidebar.put(42)
- self.assertEqual(42, sidebar.get())
+ sidebar.put(42, 'id', None)
+ self.assertEqual(42, sidebar.get('id', None))
def testFlush(self):
"""Test that getting after putting and flushing returns None.
"""
- sidebar.put(42)
- sidebar.flush()
- self.assertEqual(None, sidebar.get())
+ sidebar.put(42, 'id', None)
+ sidebar.flush('id')
+ self.assertEqual(None, sidebar.get('id', None))
def testCache(self):
"""Test that the result of a cached sidebar is cached.
"""
@sidebar.cache
- def getAnswer():
+ def getAnswer(x, y):
self.called = self.called + 1
return 42
- self.assertEqual(42, getAnswer())
- self.assertEqual(42, getAnswer())
+ self.assertEqual(42, getAnswer('id', None))
+ self.assertEqual(42, getAnswer('id', None))
self.assertEqual(self.called, 1)
--- a/tests/app/soc/views/sidebar/test_sidebar.py Wed Jan 28 23:49:45 2009 +0000
+++ b/tests/app/soc/views/sidebar/test_sidebar.py Wed Jan 28 23:52:25 2009 +0000
@@ -44,4 +44,4 @@
"""Test that the sidebar builds and does not return None.
"""
- self.assertNotEqual(None, sidebar.getSidebar())
+ self.assertNotEqual(None, sidebar.getSidebar('id', None))