Also, back on topic, here's a simple unit test for selectone for
test/mapper.py.

Index: mapper.py
===================================================================
--- mapper.py   (revision 841)
+++ mapper.py   (working copy)
@@ -130,6 +130,12 @@
             print "User", u.user_id, u.user_name, u.concat, u.count
         #l[1].user_name='asdf'
         #objectstore.commit()
+
+    def testselectone(self):
+        m = mapper(User, users)
+        u1 = m.selectone(order_by=desc(users.c.user_id))
+        self.assert_(u1.user_name == 'fred')
+        self.assert_(u1.user_id == 9)

     def testcount(self):
         m = mapper(User, users)



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to