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

Method test_columns_mismatched

test/orm/test_query.py:5803–5822  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5801 )
5802
5803 def test_columns_mismatched(self):
5804 # test that columns using column._label match, as well as that
5805 # ordering doesn't matter
5806 User = self.classes.User
5807
5808 s = fixture_session()
5809 q = s.query(User).from_statement(
5810 text(
5811 "select name, 27 as foo, id as users_id from users order by id"
5812 )
5813 )
5814 eq_(
5815 q.all(),
5816 [
5817 User(id=7, name="jack"),
5818 User(id=8, name="ed"),
5819 User(id=9, name="fred"),
5820 User(id=10, name="chuck"),
5821 ],
5822 )
5823
5824 def test_columns_mismatched_future(self):
5825 # test that columns using column._label match, as well as that

Callers

nothing calls this directly

Calls 7

fixture_sessionFunction · 0.90
textFunction · 0.90
eq_Function · 0.90
UserClass · 0.70
from_statementMethod · 0.45
queryMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected