[SQL-CVS] SQLObject/tests test.py,1.28,1.29
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <dre...@us...> - 2003-09-24 12:18:21
|
Update of /cvsroot/sqlobject/SQLObject/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv2752/tests
Modified Files:
test.py
Log Message:
Mostly whitespace and a fix for postgreSQLCreate
Index: test.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/tests/test.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** test.py 7 Sep 2003 23:36:08 -0000 1.28
--- test.py 24 Sep 2003 12:18:16 -0000 1.29
***************
*** 58,62 ****
bob.name = testString
self.assertEqual(bob.name, testString)
!
class TestCaseGetSet(TestCase1):
--- 58,62 ----
bob.name = testString
self.assertEqual(bob.name, testString)
!
class TestCaseGetSet(TestCase1):
***************
*** 67,71 ****
bob.name = 'joe'
self.assertEqual(bob.name, 'joe')
!
class TestSO2(SQLObject):
--- 67,71 ----
bob.name = 'joe'
self.assertEqual(bob.name, 'joe')
!
class TestSO2(SQLObject):
***************
*** 119,124 ****
tcc2 = TestSO3.new(name='c', other=tc4a.id)
self.assertEqual(tcc2.other, tc4a)
!
!
########################################
## Fancy sort
--- 119,124 ----
tcc2 = TestSO3.new(name='c', other=tc4a.id)
self.assertEqual(tcc2.other, tc4a)
!
!
########################################
## Fancy sort
***************
*** 160,164 ****
class IterTest(SQLObject):
name = StringCol()
!
class IterationTestCase(SQLObjectTest):
'''Test basic iteration techniques'''
--- 160,164 ----
class IterTest(SQLObject):
name = StringCol()
!
class IterationTestCase(SQLObjectTest):
'''Test basic iteration techniques'''
***************
*** 268,272 ****
finally:
TestSOTrans._connection.autoCommit = True
!
########################################
--- 268,272 ----
finally:
TestSOTrans._connection.autoCommit = True
!
########################################
***************
*** 316,320 ****
for i in range(100):
Counter.new(number=i)
!
def counterEqual(self, counters, value):
self.assertEquals([c.number for c in counters], value)
--- 316,320 ----
for i in range(100):
Counter.new(number=i)
!
def counterEqual(self, counters, value):
self.assertEquals([c.number for c in counters], value)
***************
*** 418,422 ****
l = [p.phone for p in Person.selectBy(name='tim')[0].phones]
l.sort()
! self.assertEqual(l,
['555-394-2930', '555-555-5555'])
Phone.delColumn(col, changeSchema=True)
--- 418,422 ----
l = [p.phone for p in Person.selectBy(name='tim')[0].phones]
l.sort()
! self.assertEqual(l,
['555-394-2930', '555-555-5555'])
Phone.delColumn(col, changeSchema=True)
***************
*** 517,521 ****
self.assertZipsEqual(b.addressJoiners, ['22222'])
self.assertNamesEqual(z.personJoiners, [])
!
def assertZipsEqual(self, zips, dest):
self.assertEqual([a.zip for a in zips], dest)
--- 517,521 ----
self.assertZipsEqual(b.addressJoiners, ['22222'])
self.assertNamesEqual(z.personJoiners, [])
!
def assertZipsEqual(self, zips, dest):
self.assertEqual([a.zip for a in zips], dest)
***************
*** 547,551 ****
#p1.addAddressJoiner2(a)
AddressJoiner2.new(zip='00000', personJoiner2=p2)
!
def test(self):
bob = PersonJoiner2.byName('bob')
--- 547,551 ----
#p1.addAddressJoiner2(a)
AddressJoiner2.new(zip='00000', personJoiner2=p2)
!
def test(self):
bob = PersonJoiner2.byName('bob')
***************
*** 566,570 ****
self.assertEqual([i.zip for i in p1.addressJoiner2s],
['33333', '22222', '11111'])
!
########################################
--- 566,570 ----
self.assertEqual([i.zip for i in p1.addressJoiner2s],
['33333', '22222', '11111'])
!
########################################
***************
*** 595,599 ****
s3 = Sub(s1.id)
self.assertEqual(s1, s3)
!
########################################
--- 595,599 ----
s3 = Sub(s1.id)
self.assertEqual(s1, s3)
!
########################################
***************
*** 661,665 ****
t.name3 = 0
self.assertEqual(t.name3, 0)
!
########################################
## String ID test
--- 661,666 ----
t.name3 = 0
self.assertEqual(t.name3, 0)
!
!
########################################
## String ID test
***************
*** 678,685 ****
"""
! postgresCreate = mysqlCreate
sqliteCreate = mysqlCreate
firebirdCreate = mysqlCreate
!
mysqlDrop = """
DROP TABLE IF EXISTS so_string_id
--- 679,692 ----
"""
! postgresCreate = """
! CREATE TABLE so_string_id (
! id VARCHAR(50) PRIMARY KEY,
! val TEXT
! )
! """
!
sqliteCreate = mysqlCreate
firebirdCreate = mysqlCreate
!
mysqlDrop = """
DROP TABLE IF EXISTS so_string_id
***************
*** 823,825 ****
coverage.stop()
coverModules()
!
--- 830,832 ----
coverage.stop()
coverModules()
!
|