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

Method test_select_from

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

Source from the content-addressed store, hash-verified

2587 ] == o
2588
2589 def test_select_from(self):
2590 User, Address = self.classes.User, self.classes.Address
2591
2592 sess = fixture_session()
2593 u1 = sess.get(User, 7)
2594 with assertions.expect_deprecated_20(query_wparent_dep):
2595 q = sess.query(Address).select_from(Address).with_parent(u1)
2596 self.assert_compile(
2597 q,
2598 "SELECT addresses.id AS addresses_id, "
2599 "addresses.user_id AS addresses_user_id, "
2600 "addresses.email_address AS addresses_email_address "
2601 "FROM addresses WHERE :param_1 = addresses.user_id",
2602 {"param_1": 7},
2603 )
2604
2605 def test_from_entity_query_entity(self):
2606 User, Address = self.classes.User, self.classes.Address

Callers

nothing calls this directly

Calls 6

fixture_sessionFunction · 0.90
with_parentMethod · 0.80
assert_compileMethod · 0.80
getMethod · 0.45
select_fromMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected