MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_relationship_m2m

Method test_relationship_m2m

test/ext/test_automap.py:267–277  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

265 assert a1.scalar_cls_users is u1
266
267 def test_relationship_m2m(self):
268 Base = automap_base(metadata=self.tables_test_metadata)
269
270 Base.prepare()
271
272 Order, Item = Base.classes.orders, Base.classes["items"]
273
274 o1 = Order()
275 i1 = Item()
276 o1.items_collection.append(i1)
277 assert o1 in i1.orders_collection
278
279 def test_relationship_explicit_override_forwards_m2m(self):
280 Base = automap_base(metadata=self.tables_test_metadata)

Callers

nothing calls this directly

Calls 5

automap_baseFunction · 0.90
OrderClass · 0.70
ItemClass · 0.50
prepareMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected