| 381 | ) |
| 382 | |
| 383 | def test_inline_default(self): |
| 384 | metadata = MetaData() |
| 385 | table = Table( |
| 386 | "sometable", |
| 387 | metadata, |
| 388 | Column("id", Integer, primary_key=True), |
| 389 | Column("foo", Integer, default=func.foobar()), |
| 390 | ) |
| 391 | |
| 392 | self.assert_compile( |
| 393 | table.insert().values(), |
| 394 | "INSERT INTO sometable (foo) VALUES (foobar())", |
| 395 | ) |
| 396 | |
| 397 | self.assert_compile( |
| 398 | table.insert(), |
| 399 | "INSERT INTO sometable (foo) VALUES (foobar())", |
| 400 | params={}, |
| 401 | ) |
| 402 | |
| 403 | self.assert_compile( |
| 404 | table.insert().values().inline(), |
| 405 | "INSERT INTO sometable (foo) VALUES (foobar())", |
| 406 | ) |
| 407 | |
| 408 | self.assert_compile( |
| 409 | table.insert().inline(), |
| 410 | "INSERT INTO sometable (foo) VALUES (foobar())", |
| 411 | params={}, |
| 412 | ) |
| 413 | |
| 414 | def test_insert_returning_not_in_default(self): |
| 415 | table1 = self.tables.mytable |