[SQL-CVS] SQLObject/tests test.py,1.37,1.38
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <bbo...@us...> - 2004-01-21 22:21:36
|
Update of /cvsroot/sqlobject/SQLObject/tests In directory sc8-pr-cvs1:/tmp/cvs-serv32608/tests Modified Files: test.py Log Message: Fixed so that class BOOL is a new-style class (inherits from object), so that the call to registerConverter actually means something (without inheriting from object, the type is just <type 'instance'>, which is useless when registering a converter for that type.) There hadn't been any tests for this. :/ Index: test.py =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/tests/test.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** test.py 4 Dec 2003 16:46:31 -0000 1.37 --- test.py 21 Jan 2004 22:21:33 -0000 1.38 *************** *** 89,92 **** --- 89,102 ---- me = StringCol(length=10) + class Student(SQLObject): + is_smart = BoolCol() + + class BoolColTest(SQLObjectTest): + classes = [Student] + + def testBoolCol(self): + student = Student.new(is_smart = False) + self.assertEqual(student.is_smart, False) + class TestCase34(SQLObjectTest): |