--- a/projects/FastData2/trunk/tests/test_widgetgeneration.py
+++ b/projects/FastData2/trunk/tests/test_widgetgeneration.py
@@ -1,48 +1,60 @@
 from tests.somodel import User as SOUser
-from tests.samodel import User as SAUser
-from tests.samodel import metadata
-from fastdata2.view import widget_for, column_for
+from tests.samodel import User as SAUser, metadata, ctx
+from fastdata2.view import widget_for
+from fastdata2 import widgetfactory
 from unittest import TestCase
 
 
 class WidgetCommonTst(object):
     sample_user=None
+    username_col = None
     
     def test_default_col(self):
-        c = column_for(self.sample_user, 'email_address')
-        self.assertEqual(c.name, 'email_address')
-        self.assertEqual(c.title, 'Email Address')
+        w = widget_for(obj=self.username_col, action='index')
+        render = w.render(self.sample_user.user_name)
+        self.assertEqual(w.id, 'user_name')
+        self.assert_(render.endswith('bueller</span>'))
+        
+    def test_widget_index(self):
+        w = widget_for(obj=[self.sample_user], action='index')
+        render = w.render([self.sample_user])
+        self.assertEqual('User_fdindex', w.id)
+        self.assert_(render.startswith('<table '))
+        self.assert_(render.endswith('</tbody>\n</table>'))
+        self.assert_(render.find('bueller</span>') > -1)
     
 class SOWidgets(TestCase, WidgetCommonTst):
     
     def setUp(self):
         SOUser.createTable()
-        self.sample_user = SOUser(user_name='testguy', 
-                            email_address='testguy@example.com',
+        self.sample_user = SOUser(user_name='bueller', 
+                            email_address='bueller@example.com',
                             display_name='Test Guy', 
                             password='secret')
+        self.username_col = self.sample_user.sqlmeta.columns['user_name']
+    
     def tearDown(self):
         SOUser.dropTable()
     
-    def test_so_list(self):
-        w = widget_for(obj=[self.sample_user], action='index')
-        render = w.render()
-        self.assertEqual(render,
-            '<div id="User_FD2index">I am a sqlobject list.</div>')
             
 class SAWidgets(TestCase, WidgetCommonTst):
 
     def setUp(self):
         metadata.create_all()
-        self.sample_user = SAUser()
+        user = SAUser()
+        user.user_name = 'bueller'
+        user.display_name = 'Test Guy'
+        user.password = 'secret'
+        self.sample_user = user
+        session = ctx.current
+        session.save(user)
+        session.flush()
+        self.username_col = user.c['user_name']
         
     def tearDown(self):
         metadata.drop_all()
         
-    def test_sa_list(self):
-        w = widget_for(obj=[self.sample_user], action='index')
-        render = w.render()
-        self.assertEqual(render,"<div>I am an sqlalchemy list.</div>")
+