| 1557 | eq_(row._mapping[s.c.user_name], "ed") |
| 1558 | |
| 1559 | def test_ro_mapping_py3k(self, connection): |
| 1560 | users = self.tables.users |
| 1561 | |
| 1562 | connection.execute(users.insert(), dict(user_id=1, user_name="foo")) |
| 1563 | result = connection.execute(users.select()) |
| 1564 | |
| 1565 | row = result.first() |
| 1566 | dict_row = row._asdict() |
| 1567 | |
| 1568 | odict_row = dict([("user_id", 1), ("user_name", "foo")]) |
| 1569 | eq_(dict_row, odict_row) |
| 1570 | |
| 1571 | mapping_row = row._mapping |
| 1572 | |
| 1573 | eq_(list(mapping_row), list(mapping_row.keys())) |
| 1574 | eq_(odict_row.keys(), mapping_row.keys()) |
| 1575 | eq_(odict_row.values(), mapping_row.values()) |
| 1576 | eq_(odict_row.items(), mapping_row.items()) |
| 1577 | |
| 1578 | @testing.combinations( |
| 1579 | (lambda result: result), |