1
from sqlobject import *
2
from sqlobject.tests.dbtest import *
6
class OldNames(SQLObject):
10
firstName = StringCol(length=30)
11
lastName = StringCol(length=30)
13
_defaultOrder = ['lastName', 'firstName']
17
inserts(OldNames, [('aj', 'baker'), ('joe', 'robbins'),
18
('tim', 'jackson'), ('joe', 'baker'),
20
schema='firstName lastName')
25
result.append('%s %s' % (name.firstName, name.lastName))
29
return [n.firstName for n in names]
31
def test_defaultOrder():
33
assert nameList(OldNames.select()) == \
34
['aj baker', 'joe baker',
35
'tim jackson', 'joe robbins',