| 393 | ) |
| 394 | |
| 395 | def test_inline_default(self): |
| 396 | metadata = MetaData() |
| 397 | table = Table( |
| 398 | "sometable", |
| 399 | metadata, |
| 400 | Column("id", Integer, primary_key=True), |
| 401 | Column("foo", Integer, default=func.foobar()), |
| 402 | ) |
| 403 | |
| 404 | self.assert_compile( |
| 405 | table.insert().values(), |
| 406 | "INSERT INTO sometable (foo) VALUES (foobar())", |
| 407 | ) |
| 408 | |
| 409 | self.assert_compile( |
| 410 | table.insert(), |
| 411 | "INSERT INTO sometable (foo) VALUES (foobar())", |
| 412 | params={}, |
| 413 | ) |
| 414 | |
| 415 | self.assert_compile( |
| 416 | table.insert().values().inline(), |
| 417 | "INSERT INTO sometable (foo) VALUES (foobar())", |
| 418 | ) |
| 419 | |
| 420 | self.assert_compile( |
| 421 | table.insert().inline(), |
| 422 | "INSERT INTO sometable (foo) VALUES (foobar())", |
| 423 | params={}, |
| 424 | ) |
| 425 | |
| 426 | def test_insert_returning_not_in_default(self): |
| 427 | table1 = self.tables.mytable |