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

Method test_keys

test/ext/asyncio/test_engine.py:1212–1222  ·  view source on GitHub ↗
(self, async_engine, filter_)

Source from the content-addressed store, hash-verified

1210 @testing.combinations((None,), ("mappings",), argnames="filter_")
1211 @async_test
1212 async def test_keys(self, async_engine, filter_):
1213 users = self.tables.users
1214 async with async_engine.connect() as conn:
1215 result = await conn.stream(select(users))
1216
1217 if filter_ == "mappings":
1218 result = result.mappings()
1219
1220 eq_(result.keys(), ["user_id", "user_name"])
1221
1222 await result.close()
1223
1224 @async_test
1225 async def test_unique_all(self, async_engine):

Callers

nothing calls this directly

Calls 7

selectFunction · 0.90
eq_Function · 0.90
connectMethod · 0.45
streamMethod · 0.45
mappingsMethod · 0.45
keysMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected