From 7cfd3973ce7596091ec8abd1b314811716c8e93d Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 23 Jun 2007 18:47:28 +0000 Subject: - fixed "where"/"from" criterion of select() to accept a unicode string in addition to regular string - both convert to text() --- test/sql/select.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/sql') diff --git a/test/sql/select.py b/test/sql/select.py index d8b872098..37c597a8c 100644 --- a/test/sql/select.py +++ b/test/sql/select.py @@ -400,6 +400,7 @@ WHERE mytable.myid = myothertable.otherid) AS t2view WHERE t2view.mytable_myid = "select * from foo where lala = bar" ) + # test bytestring self.runtest(select( ["foobar(a)", "pk_foo_bar(syslaal)"], "a = 12", @@ -407,6 +408,14 @@ WHERE mytable.myid = myothertable.otherid) AS t2view WHERE t2view.mytable_myid = ), "SELECT foobar(a), pk_foo_bar(syslaal) FROM foobar left outer join lala on foobar.foo = lala.foo WHERE a = 12") + # test unicode + self.runtest(select( + [u"foobar(a)", u"pk_foo_bar(syslaal)"], + u"a = 12", + from_obj = [u"foobar left outer join lala on foobar.foo = lala.foo"] + ), + u"SELECT foobar(a), pk_foo_bar(syslaal) FROM foobar left outer join lala on foobar.foo = lala.foo WHERE a = 12") + # test building a select query programmatically with text s = select() s.append_column("column1") -- cgit v1.2.1