diff options
author | Jason Kirtland <jek@discorporate.us> | 2008-05-21 23:58:16 +0000 |
---|---|---|
committer | Jason Kirtland <jek@discorporate.us> | 2008-05-21 23:58:16 +0000 |
commit | eb8a6ed51a7d23146c87823d4aeb186d33990fe5 (patch) | |
tree | e730106f528c48e8bd111dbc2ae05b3cf46a9459 /test/orm/session.py | |
parent | cff1686cb9a0e85137786757a4579a7c18e550db (diff) | |
download | sqlalchemy-eb8a6ed51a7d23146c87823d4aeb186d33990fe5.tar.gz |
- unrolled loops for the simplified Session.get_bind() args
- restored the chunk of test r4806 deleted (!)
Diffstat (limited to 'test/orm/session.py')
-rw-r--r-- | test/orm/session.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/orm/session.py b/test/orm/session.py index 5e45afb45..7f4181227 100644 --- a/test/orm/session.py +++ b/test/orm/session.py @@ -986,12 +986,13 @@ class SessionInterface(testing.TestBase): # TODO: expand with message body assertions. - _class_methods = set(('get', 'load')) + _class_methods = set(( + 'connection', 'execute', 'get', 'get_bind', 'load', 'scalar')) def _public_session_methods(self): Session = sa.orm.session.Session - blacklist = set(('begin', 'query', 'connection', 'execute', 'get_bind', 'scalar')) + blacklist = set(('begin', 'query')) ok = set() for meth in Session.public_methods: @@ -1067,10 +1068,18 @@ class SessionInterface(testing.TestBase): self.assertRaises(sa.orm.exc.UnmappedClassError, callable_, *args, **kw) + raises_('connection', mapper=user_arg) + + raises_('execute', 'SELECT 1', mapper=user_arg) + raises_('get', user_arg, 1) + raises_('get_bind', mapper=user_arg) + raises_('load', user_arg, 1) + raises_('scalar', 'SELECT 1', mapper=user_arg) + eq_(watchdog, self._class_methods, watchdog.symmetric_difference(self._class_methods)) |