summaryrefslogtreecommitdiff
path: root/test/sql/test_text.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-12-11 20:00:39 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-12-11 20:00:39 -0500
commitd5384d601107b76bca1634c55fb72372b2d68d42 (patch)
tree3d5b3e1aad312e16ad36d67d8be6b6fd95a9890b /test/sql/test_text.py
parent84af7e6c22100ef26c5a27185b1d270f5afb3370 (diff)
downloadsqlalchemy-d5384d601107b76bca1634c55fb72372b2d68d42.tar.gz
- implement "literal binds" for the text() clause, [ticket:2882]
Diffstat (limited to 'test/sql/test_text.py')
-rw-r--r--test/sql/test_text.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/sql/test_text.py b/test/sql/test_text.py
index 827f4dfb9..37346437e 100644
--- a/test/sql/test_text.py
+++ b/test/sql/test_text.py
@@ -165,6 +165,17 @@ class BindParamTest(fixtures.TestBase, AssertsCompiledSQL):
checkparams={'bar': 4, 'whee': 7},
)
+ def test_literal_binds(self):
+ t = text("select * from foo where lala=:bar and hoho=:whee")
+ t = t.bindparams(bindparam('bar', 4), whee='whee')
+
+ self.assert_compile(
+ t,
+ "select * from foo where lala=4 and hoho='whee'",
+ checkparams={},
+ literal_binds=True
+ )
+
def _assert_type_map(self, t, compare):
map_ = dict(
(b.key, b.type) for b in t._bindparams.values()