Style and import sorting fixes in tests modules.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Wed, 28 Jan 2009 11:21:58 +0000
changeset 1027 9633a6a5e5f9
parent 1026 e93271e9c70e
child 1028 43fdf6739e8d
Style and import sorting fixes in tests modules. Patch by: Pawel Solyga Reviewed by: to-be-reviewed
tests/app/soc/cache/test_base.py
tests/app/soc/cache/test_sidebar.py
tests/app/soc/views/sidebar/test_sidebar.py
--- a/tests/app/soc/cache/test_base.py	Wed Jan 28 11:15:32 2009 +0000
+++ b/tests/app/soc/cache/test_base.py	Wed Jan 28 11:21:58 2009 +0000
@@ -28,7 +28,7 @@
 
 
 class CacheDecoratorTest(unittest.TestCase):
-  """Tests that the @cache decorator caches the result
+  """Tests that the @cache decorator caches the result.
   """
 
   def setUp(self):
@@ -53,14 +53,14 @@
     memcache.add('answer_to_life', 42)
 
   def testMemcache(self):
-    """Santiy check to see if memcache is working
+    """Sanity check to see if memcache is working.
     """
 
     memcache.add('answer_to_life', 42)
     self.assertEqual(memcache.get('answer_to_life'), 42)
 
   def testSidebarCaching(self):
-    """Test that the caching decorator caches
+    """Test that the caching decorator caches.
     """
 
     self.failOnSecondCall()
--- a/tests/app/soc/cache/test_sidebar.py	Wed Jan 28 11:15:32 2009 +0000
+++ b/tests/app/soc/cache/test_sidebar.py	Wed Jan 28 11:21:58 2009 +0000
@@ -20,16 +20,16 @@
   ]
 
 
+import unittest
+
 from google.appengine.api import users
 from google.appengine.api import memcache
 
-import unittest
-
 from soc.cache import sidebar
 
 
 class SidebarCacheTest(unittest.TestCase):
-  """Tests that the sidebar properly uses caching
+  """Tests that the sidebar properly uses caching.
   """
 
   def setUp(self):
@@ -40,32 +40,32 @@
     memcache.flush_all()
 
   def testGetCurrentUser(self):
-    """Santiy check to see if get_current_user returns same value
+    """Sanity check to see if get_current_user returns same value.
     """
 
     self.assertEqual(self.user, users.get_current_user())
 
   def testKey(self):
-    """Test that the key method returns a unique key
+    """Test that the key method returns a unique key.
     """
 
     self.assertEqual("sidebar_for_users.User(email='test@example.com')",
                      sidebar.key(self.user))
 
   def testGet(self):
-    """Test that get without setting something returns None
+    """Test that get without setting something returns None.
     """
     self.assertEqual(None, sidebar.get())
 
   def testGetPut(self):
-    """Test that getting after putting gives back what you put in
+    """Test that getting after putting gives back what you put in.
     """
 
     sidebar.put(42)
     self.assertEqual(42, sidebar.get())
 
   def testFlush(self):
-    """Test that getting after putting and flushing returns None
+    """Test that getting after putting and flushing returns None.
     """
 
     sidebar.put(42)
@@ -73,7 +73,7 @@
     self.assertEqual(None, sidebar.get())
 
   def testCache(self):
-    """Test that the result of a cached sidebar is cached
+    """Test that the result of a cached sidebar is cached.
     """
 
     @sidebar.cache
--- a/tests/app/soc/views/sidebar/test_sidebar.py	Wed Jan 28 11:15:32 2009 +0000
+++ b/tests/app/soc/views/sidebar/test_sidebar.py	Wed Jan 28 11:21:58 2009 +0000
@@ -27,12 +27,13 @@
 
 from soc.views.sitemap import sidebar
 
+
 class SidebarTest(unittest.TestCase):
   def setUp(self):
     pass
 
   def testSidebarCallbacksAreAdded(self):
-    """Test that the sidebar callbacks are added when importing 'build'
+    """Test that the sidebar callbacks are added when importing 'build'.
     """
 
     self.assertEqual([], sidebar.SIDEBAR)
@@ -40,7 +41,7 @@
     self.assertNotEqual([], sidebar.SIDEBAR)
 
   def testSidebarBuilds(self):
-    """test that the sidebar builds and does not return None
+    """Test that the sidebar builds and does not return None.
     """
 
     self.assertNotEqual(None, sidebar.getSidebar())