| 1324 | ) |
| 1325 | @async_test |
| 1326 | async def test_one_success(self, async_engine, filter_): |
| 1327 | users = self.tables.users |
| 1328 | async with async_engine.connect() as conn: |
| 1329 | result = await conn.stream( |
| 1330 | select(users).limit(1).order_by(users.c.user_name) |
| 1331 | ) |
| 1332 | |
| 1333 | if filter_ == "mappings": |
| 1334 | result = result.mappings() |
| 1335 | elif filter_ == "scalars": |
| 1336 | result = result.scalars() |
| 1337 | u1 = await result.one() |
| 1338 | |
| 1339 | if filter_ == "mappings": |
| 1340 | eq_(u1, {"user_id": 1, "user_name": "name%d" % 1}) |
| 1341 | elif filter_ == "scalars": |
| 1342 | eq_(u1, 1) |
| 1343 | else: |
| 1344 | eq_(u1, (1, "name%d" % 1)) |
| 1345 | |
| 1346 | @async_test |
| 1347 | async def test_one_no_result(self, async_engine): |