From 4fec72f178f0da016301a0d12ad9abe02cc2b62a Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 28 Dec 2016 16:32:53 -0500 Subject: Pass **kw to bound params in multi values Fixed bug where literal_binds compiler flag was not honored by the :class:`.Insert` construct for the "multiple values" feature; the subsequent values are now rendered as literals. Change-Id: I81ac358fd59995885d482e7571620090210865d2 Fixes: #3880 --- test/sql/test_insert.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/sql/test_insert.py') diff --git a/test/sql/test_insert.py b/test/sql/test_insert.py index 73731e952..e23ab520d 100644 --- a/test/sql/test_insert.py +++ b/test/sql/test_insert.py @@ -683,6 +683,18 @@ class InsertImplicitReturningTest( 'othername_m0': 'foo'} ) + def test_insert_multiple_values_literal_binds(self): + ins = self.tables.myothertable.insert().values([ + {"othername": "foo"}, + {"othername": "bar"}, + ]) + self.assert_compile( + ins, + "INSERT INTO myothertable (othername) VALUES ('foo'), ('bar')", + checkparams={}, + literal_binds=True + ) + def test_insert_multiple_values_return_defaults(self): # TODO: not sure if this should raise an # error or what -- cgit v1.2.1