MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_select_from

Method test_select_from

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

Source from the content-addressed store, hash-verified

1728 ] == o
1729
1730 def test_select_from(self):
1731 User, Address = self.classes.User, self.classes.Address
1732
1733 sess = fixture_session()
1734 u1 = sess.get(User, 7)
1735 with assertions.expect_deprecated_20(query_wparent_dep):
1736 q = sess.query(Address).select_from(Address).with_parent(u1)
1737 self.assert_compile(
1738 q,
1739 "SELECT addresses.id AS addresses_id, "
1740 "addresses.user_id AS addresses_user_id, "
1741 "addresses.email_address AS addresses_email_address "
1742 "FROM addresses WHERE :param_1 = addresses.user_id",
1743 {"param_1": 7},
1744 )
1745
1746 def test_from_entity_query_entity(self):
1747 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