MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_items

Method test_items

test/sql/test_resultset.py:1667–1675  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

1665 eq_(list(row._mapping.keys()), ["user_id", "user_name_1", "count_1"])
1666
1667 def test_items(self, connection):
1668 users = self.tables.users
1669
1670 connection.execute(users.insert(), dict(user_id=1, user_name="foo"))
1671 r = connection.execute(users.select()).first()
1672 eq_(
1673 [(x[0].lower(), x[1]) for x in list(r._mapping.items())],
1674 [("user_id", 1), ("user_name", "foo")],
1675 )
1676
1677 def test_len(self, connection):
1678 users = self.tables.users

Callers

nothing calls this directly

Calls 7

eq_Function · 0.90
lowerMethod · 0.80
executeMethod · 0.45
insertMethod · 0.45
firstMethod · 0.45
selectMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected