Update of /cvsroot/sqlobject/SQLObject/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv21238/tests
Modified Files:
test.py test_converters.py
Log Message:
Added BoolCol with tests
Index: test.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/tests/test.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** test.py 24 Sep 2003 12:18:16 -0000 1.29
--- test.py 25 Sep 2003 20:40:25 -0000 1.30
***************
*** 436,440 ****
age INT DEFAULT NULL,
created DATETIME NOT NULL,
! happy char(1) DEFAULT 'Y' NOT NULL
)
"""
--- 436,441 ----
age INT DEFAULT NULL,
created DATETIME NOT NULL,
! happy char(1) DEFAULT 'Y' NOT NULL,
! wannahavefun BOOL DEFAULT FALSE NOT NULL
)
"""
***************
*** 447,451 ****
age INT DEFAULT 0,
created VARCHAR(40) NOT NULL,
! happy char(1) DEFAULT 'Y' NOT NULL
)
"""
--- 448,453 ----
age INT DEFAULT 0,
created VARCHAR(40) NOT NULL,
! happy char(1) DEFAULT 'Y' NOT NULL,
! wannahavefun BOOL DEFAULT FALSE NOT NULL
)
"""
***************
*** 468,479 ****
_fromDatabase = True
_connection = connection()
! AutoTest.new(firstName='john',
! lastName='doe',
! age=10,
! created=DateTime.now())
! AutoTest.new(firstName='jane',
! lastName='doe',
! happy='N',
! created=DateTime.now())
reg = sys.modules[SQLObject.__module__].classRegistry[AutoTest._registry]
del reg['AutoTest']
--- 470,485 ----
_fromDatabase = True
_connection = connection()
! john = AutoTest.new(firstName='john',
! lastName='doe',
! age=10,
! created=DateTime.now(),
! wannahavefun=False)
! jane = AutoTest.new(firstName='jane',
! lastName='doe',
! happy='N',
! created=DateTime.now(),
! wannahavefun=True)
! self.failIf(john.wannahavefun)
! self.failUnless(jane.wannahavefun)
reg = sys.modules[SQLObject.__module__].classRegistry[AutoTest._registry]
del reg['AutoTest']
Index: test_converters.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/tests/test_converters.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_converters.py 31 Jul 2003 14:25:33 -0000 1.3
--- test_converters.py 25 Sep 2003 20:40:25 -0000 1.4
***************
*** 74,77 ****
--- 74,81 ----
self.assertEqual(sqlRepr(('one','two','three')), "('one', 'two', 'three')")
+ def test_bool(self):
+ self.assertEqual(sqlRepr(True), 'True')
+ self.assertEqual(sqlRepr(False), 'False')
+
def test_instance(self):
instance = TestClass()
|