| 678 | eq_(r[:-1], (1, 2)) |
| 679 | |
| 680 | def test_mappings(self, connection): |
| 681 | users = self.tables.users |
| 682 | addresses = self.tables.addresses |
| 683 | |
| 684 | connection.execute(users.insert(), dict(user_id=1, user_name="john")) |
| 685 | connection.execute(users.insert(), dict(user_id=2, user_name="jack")) |
| 686 | connection.execute( |
| 687 | addresses.insert(), |
| 688 | dict(address_id=1, user_id=2, address="foo@bar.com"), |
| 689 | ) |
| 690 | |
| 691 | r = connection.execute(text("select * from addresses")) |
| 692 | eq_( |
| 693 | r.mappings().all(), |
| 694 | [{"address_id": 1, "user_id": 2, "address": "foo@bar.com"}], |
| 695 | ) |
| 696 | |
| 697 | def test_column_accessor_basic_compiled_mapping(self, connection): |
| 698 | users = self.tables.users |