(self, metadata, connection)
| 1307 | |
| 1308 | @testing.requires.unicode_connections |
| 1309 | def test_unicode(self, metadata, connection): |
| 1310 | table = Table( |
| 1311 | "unicode_data", |
| 1312 | metadata, |
| 1313 | Column("id", Unicode(40), primary_key=True), |
| 1314 | Column("data", Unicode(40)), |
| 1315 | ) |
| 1316 | metadata.create_all(connection) |
| 1317 | ustring = util.b("petit voix m\xe2\x80\x99a").decode("utf-8") |
| 1318 | |
| 1319 | connection.execute(table.insert(), dict(id=ustring, data=ustring)) |
| 1320 | |
| 1321 | class LocalFoo(self.classes.Base): |
| 1322 | pass |
| 1323 | |
| 1324 | self.mapper_registry.map_imperatively(LocalFoo, table) |
| 1325 | with Session(connection) as sess: |
| 1326 | eq_( |
| 1327 | sess.get(LocalFoo, ustring), |
| 1328 | LocalFoo(id=ustring, data=ustring), |
| 1329 | ) |
| 1330 | |
| 1331 | |
| 1332 | class InvalidGenerationsTest(QueryTest, AssertsCompiledSQL): |
nothing calls this directly
no test coverage detected