MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_session_unbound

Method test_session_unbound

test/orm/test_bind.py:659–671  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

657 sess.close()
658
659 def test_session_unbound(self):
660 Foo = self.classes.Foo
661
662 sess = Session()
663 sess.add(Foo())
664 assert_raises_message(
665 sa.exc.UnboundExecutionError,
666 (
667 "Could not locate a bind configured on Mapper|Foo|test_table "
668 "or this Session"
669 ),
670 sess.flush,
671 )
672
673
674class GetBindTest(fixtures.MappedTest):

Callers

nothing calls this directly

Calls 4

addMethod · 0.95
SessionClass · 0.90
assert_raises_messageFunction · 0.90
FooClass · 0.70

Tested by

no test coverage detected