test a single tuple
(self)
| 284 | c.execute("drop table test_aggregates") |
| 285 | |
| 286 | def test_single_tuple(self): |
| 287 | """test a single tuple""" |
| 288 | conn = self.connect() |
| 289 | c = conn.cursor() |
| 290 | self.safe_create_table( |
| 291 | conn, "mystuff", "create table mystuff (id integer primary key)" |
| 292 | ) |
| 293 | c.execute("insert into mystuff (id) values (1)") |
| 294 | c.execute("insert into mystuff (id) values (2)") |
| 295 | c.execute("select id from mystuff where id in %s", ((1,),)) |
| 296 | self.assertEqual([(1,)], list(c.fetchall())) |
| 297 | c.close() |
| 298 | |
| 299 | def test_json(self): |
| 300 | args = self.databases[0].copy() |