MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_detached_raise

Method test_detached_raise

test/orm/test_dynamic.py:305–317  ·  view source on GitHub ↗

so filtering on a detached dynamic list raises an error...

(self, user_address_fixture)

Source from the content-addressed store, hash-verified

303 eq_(meth(), expected)
304
305 def test_detached_raise(self, user_address_fixture):
306 """so filtering on a detached dynamic list raises an error..."""
307
308 User, Address = user_address_fixture()
309
310 sess = fixture_session()
311 u = sess.get(User, 8)
312 sess.expunge(u)
313 assert_raises(
314 orm_exc.DetachedInstanceError,
315 u.addresses.filter_by,
316 email_address="e",
317 )
318
319 def test_detached_all_empty_list(self, user_address_fixture):
320 """test #6426 - but you can call .all() on it and you get an empty

Callers

nothing calls this directly

Calls 4

fixture_sessionFunction · 0.90
assert_raisesFunction · 0.90
getMethod · 0.45
expungeMethod · 0.45

Tested by

no test coverage detected