summaryrefslogtreecommitdiff
path: root/test/ext/declarative.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-08-19 21:27:34 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-08-19 21:27:34 +0000
commit427ed1966f0f9ce13df49dcdbe43ce48333e94fa (patch)
tree20c34c3a838c37c73828473ea47e889c51f1fe8f /test/ext/declarative.py
parent20c82967ca98ceead88401ca8f35f8cf0e758318 (diff)
downloadsqlalchemy-427ed1966f0f9ce13df49dcdbe43ce48333e94fa.tar.gz
- fixed a bug in declarative test which was looking for old version of history
- Added "sorted_tables" accessor to MetaData, which returns Table objects sorted in order of dependency as a list. This deprecates the MetaData.table_iterator() method. The "reverse=False" keyword argument has also been removed from util.sort_tables(); use the Python 'reversed' function to reverse the results. [ticket:1033]
Diffstat (limited to 'test/ext/declarative.py')
-rw-r--r--test/ext/declarative.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ext/declarative.py b/test/ext/declarative.py
index c1a56ced2..b9fa57cf0 100644
--- a/test/ext/declarative.py
+++ b/test/ext/declarative.py
@@ -392,7 +392,7 @@ class DeclarativeTest(testing.TestBase, testing.AssertsExecutionResults):
u1 = User(name='u1', a='a', b='b')
eq_(u1.a, 'a')
- eq_(User.a.get_history(u1), (['a'], [], []))
+ eq_(User.a.get_history(u1), (['a'], (), ()))
sess = create_session()
sess.save(u1)
sess.flush()
@@ -777,7 +777,7 @@ class DeclarativeReflectionTest(testing.TestBase):
Base = decl.declarative_base(testing.db)
def tearDown(self):
- for t in reflection_metadata.table_iterator():
+ for t in reflection_metadata.sorted_tables:
t.delete().execute()
def tearDownAll(self):