diff options
Diffstat (limited to 'test/sql/test_insert.py')
| -rw-r--r-- | test/sql/test_insert.py | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/test/sql/test_insert.py b/test/sql/test_insert.py index f4516f942..7508ee6c7 100644 --- a/test/sql/test_insert.py +++ b/test/sql/test_insert.py @@ -135,10 +135,19 @@ class InsertTest(_InsertTestBase, fixtures.TablesTest, AssertsCompiledSQL): ) self.assert_compile( - t.insert(inline=True, values={}), + t.insert().values({}), "INSERT INTO test (col1, col2) VALUES (foo(:foo_1), " "(SELECT coalesce(max(foo.id)) AS coalesce_1 FROM " "foo))", + inline_flag=False, + ) + + self.assert_compile( + t.insert().inline().values({}), + "INSERT INTO test (col1, col2) VALUES (foo(:foo_1), " + "(SELECT coalesce(max(foo.id)) AS coalesce_1 FROM " + "foo))", + inline_flag=True, ) def test_generic_insert_bind_params_all_columns(self): @@ -290,14 +299,29 @@ class InsertTest(_InsertTestBase, fixtures.TablesTest, AssertsCompiledSQL): ) self.assert_compile( - table.insert(values={}, inline=True), + table.insert().values(), + "INSERT INTO sometable (foo) VALUES (foobar())", + inline_flag=False, + ) + + self.assert_compile( + table.insert(), + "INSERT INTO sometable (foo) VALUES (foobar())", + params={}, + inline_flag=False, + ) + + self.assert_compile( + table.insert().values().inline(), "INSERT INTO sometable (foo) VALUES (foobar())", + inline_flag=True, ) self.assert_compile( - table.insert(inline=True), + table.insert().inline(), "INSERT INTO sometable (foo) VALUES (foobar())", params={}, + inline_flag=True, ) def test_insert_returning_not_in_default(self): |
