MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_column_queries_five

Method test_column_queries_five

test/orm/test_froms.py:1960–1979  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1958 )
1959
1960 def test_column_queries_five(self):
1961 Address, User = (
1962 self.classes.Address,
1963 self.classes.User,
1964 )
1965
1966 sess = fixture_session()
1967 eq_(
1968 sess.query(User, func.count(Address.email_address))
1969 .outerjoin(User.addresses)
1970 .group_by(User)
1971 .order_by(User.id)
1972 .all(),
1973 [
1974 (User(name="jack", id=7), 1),
1975 (User(name="ed", id=8), 3),
1976 (User(name="fred", id=9), 1),
1977 (User(name="chuck", id=10), 0),
1978 ],
1979 )
1980
1981 def test_column_queries_six(self):
1982 Address, User = (

Callers

nothing calls this directly

Calls 9

fixture_sessionFunction · 0.90
eq_Function · 0.90
UserClass · 0.70
allMethod · 0.45
order_byMethod · 0.45
group_byMethod · 0.45
outerjoinMethod · 0.45
queryMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected