diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-06-23 18:47:28 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-06-23 18:47:28 +0000 |
| commit | 7cfd3973ce7596091ec8abd1b314811716c8e93d (patch) | |
| tree | 184f23731e7703656c9e8d982fd23401badcf533 /test/sql | |
| parent | 1af29a42d2007037f5ea790a005d05dded7d43c1 (diff) | |
| download | sqlalchemy-7cfd3973ce7596091ec8abd1b314811716c8e93d.tar.gz | |
- fixed "where"/"from" criterion of select() to accept a unicode string
in addition to regular string - both convert to text()
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/select.py | 9 |
1 files changed, 9 insertions, 0 deletions
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") |
