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

Method test_five

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

Source from the content-addressed store, hash-verified

1502 self._assert_opts(sess.query(User), sub_opt, non_sub_opts)
1503
1504 def test_five(self):
1505 User, Address, Order, Item, SubItem, Keyword = self.classes(
1506 "User", "Address", "Order", "Item", "SubItem", "Keyword"
1507 )
1508 sub_opt = joinedload(User.orders).options(load_only(Order.description))
1509 non_sub_opts = [
1510 joinedload(User.orders),
1511 defaultload(User.orders).load_only(Order.description),
1512 ]
1513 sess = fixture_session()
1514 self._assert_opts(sess.query(User), sub_opt, non_sub_opts)
1515
1516 def test_invalid_one(self):
1517 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