update Sidebar tests to use getCore
authorSverre Rabbelier <sverre@rabbelier.nl>
Sat, 18 Jul 2009 15:04:44 -0700
changeset 2663 d270bd8b7417
parent 2662 833785d10ecf
child 2664 06d4f4d06f64
update Sidebar tests to use getCore
tests/app/soc/views/sidebar/test_sidebar.py
--- a/tests/app/soc/views/sidebar/test_sidebar.py	Sat Jul 18 14:58:12 2009 -0700
+++ b/tests/app/soc/views/sidebar/test_sidebar.py	Sat Jul 18 15:04:44 2009 -0700
@@ -25,23 +25,15 @@
 from google.appengine.api import users
 from google.appengine.api import memcache
 
-from soc.views.sitemap import sidebar
+from soc.modules import callback
 
 
 class SidebarTest(unittest.TestCase):
   def setUp(self):
     pass
 
-  def testSidebarCallbacksAreAdded(self):
-    """Test that the sidebar callbacks are added when importing 'build'.
-    """
-
-    self.assertEqual([], sidebar.SIDEBAR)
-    from soc.views.sitemap import build
-    self.assertNotEqual([], sidebar.SIDEBAR)
-
   def testSidebarBuilds(self):
     """Test that the sidebar builds and does not return None.
     """
 
-    self.assertNotEqual(None, sidebar.getSidebar('id', None))
+    self.assertNotEqual(None, callback.getCore().getSidebar('id', None))