diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-03-26 19:03:11 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-03-26 19:03:11 -0400 |
| commit | 14a2fae2398fb05f7ced56cec25e6f98307356f4 (patch) | |
| tree | 6e7fde84f805d08659a96638b13edb08e681b5e9 /test/orm/test_bind.py | |
| parent | dfd2c0fb5e1780966d0d5dfdb3d783177640f78f (diff) | |
| download | sqlalchemy-14a2fae2398fb05f7ced56cec25e6f98307356f4.tar.gz | |
- remove @testing.resolve_artifact_names, replace with direct attribute
access to the cls/self.tables/classes registries
- express orm/_base.py ORMTest in terms of engine/_base.py TablesTest,
factor out common steps into TablesTest, remove AltEngineTest as a
separate class. will further consolidate these base classes
Diffstat (limited to 'test/orm/test_bind.py')
| -rw-r--r-- | test/orm/test_bind.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/orm/test_bind.py b/test/orm/test_bind.py index bab9be428..d680de0a7 100644 --- a/test/orm/test_bind.py +++ b/test/orm/test_bind.py @@ -22,16 +22,18 @@ class BindTest(_base.MappedTest): pass @classmethod - @testing.resolve_artifact_names def setup_mappers(cls): + test_table, Foo = cls.tables.test_table, cls.classes.Foo + meta = MetaData() test_table.tometadata(meta) assert meta.tables['test_table'].bind is None mapper(Foo, meta.tables['test_table']) - @testing.resolve_artifact_names def test_session_bind(self): + Foo = self.classes.Foo + engine = self.metadata.bind for bind in (engine, engine.connect()): @@ -46,8 +48,9 @@ class BindTest(_base.MappedTest): if hasattr(bind, 'close'): bind.close() - @testing.resolve_artifact_names def test_session_unbound(self): + Foo = self.classes.Foo + sess = create_session() sess.add(Foo()) assert_raises_message( |
