| 695 | eq_(row._mapping["col1"], 1) |
| 696 | |
| 697 | def test_row_getitem_string(self, connection): |
| 698 | users = self.tables.users |
| 699 | |
| 700 | connection.execute( |
| 701 | users.insert(), |
| 702 | [ |
| 703 | dict(user_id=1, user_name="john"), |
| 704 | dict(user_id=2, user_name="jack"), |
| 705 | ], |
| 706 | ) |
| 707 | |
| 708 | r = connection.execute( |
| 709 | text("select * from users where user_id=2") |
| 710 | ).first() |
| 711 | |
| 712 | with expect_raises_message(TypeError, "tuple indices must be"): |
| 713 | r["foo"] |
| 714 | |
| 715 | eq_(r._mapping["user_name"], "jack") |
| 716 | |
| 717 | def test_row_getitem_column(self, connection): |
| 718 | col = literal_column("1").label("foo") |