summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJonathan LaCour <jonathan@cleverdevil.org>2006-06-28 17:26:48 +0000
committerJonathan LaCour <jonathan@cleverdevil.org>2006-06-28 17:26:48 +0000
commit70b2dec19a9d5f2dd163704e58f38f2f82e5bf45 (patch)
tree46c0296fa4e778ae5bdd09cb11e6e5fb23ee5f4f /test
parent7626fc5aab8b625bb6e48e7374d4622efc7f1e5a (diff)
downloadsqlalchemy-70b2dec19a9d5f2dd163704e58f38f2f82e5bf45.tar.gz
Updated ActiveMapper to support order_by parameters on all relationships.
Thanks to Charles Duffy for this patch!
Diffstat (limited to 'test')
-rw-r--r--test/ext/activemapper.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/test/ext/activemapper.py b/test/ext/activemapper.py
index 6a8b0904e..f33d3d9bb 100644
--- a/test/ext/activemapper.py
+++ b/test/ext/activemapper.py
@@ -26,7 +26,7 @@ class testcase(testbase.PersistTest):
cell_phone = column(String)
work_phone = column(String)
prefs_id = column(Integer, foreign_key=ForeignKey('preferences.id'))
- addresses = one_to_many('Address', colname='person_id', backref='person')
+ addresses = one_to_many('Address', colname='person_id', backref='person', order_by=['state', 'city', 'postal_code'])
preferences = one_to_one('Preferences', colname='pref_id', backref='person')
def __str__(self):
@@ -68,17 +68,6 @@ class testcase(testbase.PersistTest):
def tearDown(self):
for t in activemapper.metadata.table_iterator(reverse=True):
t.delete().execute()
- #people = Person.select()
- #for person in people: person.delete()
-
- #addresses = Address.select()
- #for address in addresses: address.delete()
-
- #preferences = Preferences.select()
- #for preference in preferences: preference.delete()
-
- #objectstore.flush()
- #objectstore.clear()
def create_person_one(self):
# create a person
@@ -234,4 +223,4 @@ if __name__ == '__main__':
# go ahead and setup the database connection, and create the tables
# launch the unit tests
- unittest.main() \ No newline at end of file
+ unittest.main()