MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_five

Method test_five

test/orm/test_options.py:1494–1504  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1492 self._assert_opts(sess.query(User), sub_opt, non_sub_opts)
1493
1494 def test_five(self):
1495 User, Address, Order, Item, SubItem, Keyword = self.classes(
1496 "User", "Address", "Order", "Item", "SubItem", "Keyword"
1497 )
1498 sub_opt = joinedload(User.orders).options(load_only(Order.description))
1499 non_sub_opts = [
1500 joinedload(User.orders),
1501 defaultload(User.orders).load_only(Order.description),
1502 ]
1503 sess = fixture_session()
1504 self._assert_opts(sess.query(User), sub_opt, non_sub_opts)
1505
1506 def test_invalid_one(self):
1507 User, Address, Order, Item, SubItem = self.classes(

Callers

nothing calls this directly

Calls 8

_assert_optsMethod · 0.95
joinedloadFunction · 0.90
load_onlyFunction · 0.90
defaultloadFunction · 0.90
fixture_sessionFunction · 0.90
load_onlyMethod · 0.80
optionsMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected