diff options
author | Jason Kirtland <jek@discorporate.us> | 2008-01-12 22:03:42 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2008-01-12 22:03:42 +0000 |
commit | 17d3c8764e020379e54053bca0b0a2bc71d48aa0 (patch) | |
tree | 0b46f1ddc57292b8f5bfbc28ab1679230f63e426 /test/orm/selectable.py | |
parent | c194962019d1bc7322e20b82c33aa1bab3bc2a28 (diff) | |
download | sqlalchemy-17d3c8764e020379e54053bca0b0a2bc71d48aa0.tar.gz |
- testbase is gone, replaced by testenv
- Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase
- testing.db has the configured db
- Fixed up the perf/* scripts
Diffstat (limited to 'test/orm/selectable.py')
-rw-r--r-- | test/orm/selectable.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/orm/selectable.py b/test/orm/selectable.py index 3478bc922..30771ec2b 100644 --- a/test/orm/selectable.py +++ b/test/orm/selectable.py @@ -1,6 +1,6 @@ """all tests involving generic mapping to Select statements""" -import testbase +import testenv; testenv.configure_for_tests() from sqlalchemy import * from sqlalchemy import exceptions from sqlalchemy.orm import * @@ -16,7 +16,7 @@ class SelectableNoFromsTest(ORMTest): Column('data', Integer), Column('extra', String(45)), ) - + def test_no_tables(self): class Subset(object): pass @@ -27,7 +27,7 @@ class SelectableNoFromsTest(ORMTest): assert False except exceptions.InvalidRequestError, e: assert str(e) == "Could not find any Table objects in mapped table 'SELECT x, y, z'", str(e) - + def test_basic(self): class Subset(Base): pass @@ -35,7 +35,7 @@ class SelectableNoFromsTest(ORMTest): subset_select = select([common_table.c.id, common_table.c.data]).alias('subset') subset_mapper = mapper(Subset, subset_select) - sess = create_session(bind=testbase.db) + sess = create_session(bind=testing.db) l = Subset() l.data = 1 sess.save(l) @@ -45,6 +45,6 @@ class SelectableNoFromsTest(ORMTest): assert [Subset(data=1)] == sess.query(Subset).all() # TODO: more tests mapping to selects - + if __name__ == '__main__': - testbase.main() + testenv.main() |