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

Method test_m2m

test/orm/test_deprecations.py:2723–2734  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2721 q = sess.query(Item).with_parent(u1)
2722
2723 def test_m2m(self):
2724 Item, Keyword = self.classes.Item, self.classes.Keyword
2725
2726 sess = fixture_session()
2727 i1 = sess.query(Item).filter_by(id=2).one()
2728 with assertions.expect_deprecated_20(query_wparent_dep):
2729 k = sess.query(Keyword).with_parent(i1).all()
2730 assert [
2731 Keyword(name="red"),
2732 Keyword(name="small"),
2733 Keyword(name="square"),
2734 ] == k
2735
2736 def test_with_transient(self):
2737 User, Order = self.classes.User, self.classes.Order

Callers

nothing calls this directly

Calls 7

fixture_sessionFunction · 0.90
with_parentMethod · 0.80
KeywordClass · 0.70
oneMethod · 0.45
filter_byMethod · 0.45
queryMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected