diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-09-09 15:54:10 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-09-09 15:54:10 +0000 |
| commit | 3b724ae1ccefd0b8db516877b58a3411803e44ad (patch) | |
| tree | 1677b1638802d9002dfb7ff723e42abbed100352 /test/sql | |
| parent | 8204fa721da8c706b5030fb836d1a94696d2200a (diff) | |
| download | sqlalchemy-3b724ae1ccefd0b8db516877b58a3411803e44ad.tar.gz | |
- Bind params now subclass ColumnElement which allows them to be
selectable by orm.query (they already had most ColumnElement
semantics).
- Added select_from() method to exists() construct, which becomes
more and more compatible with a regular select().
- Bind parameters/literals given a True/False value will detect
their type as Boolean
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/query.py | 5 | ||||
| -rw-r--r-- | test/sql/select.py | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/test/sql/query.py b/test/sql/query.py index 6ca2a2542..0849d1a7b 100644 --- a/test/sql/query.py +++ b/test/sql/query.py @@ -201,10 +201,7 @@ class QueryTest(TestBase): self.assert_(not (equal != equal)) def test_or_and_as_columns(self): - if testing.against('sqlite'): - true, false = 1, 0 - else: - true, false = literal_column('true'), literal_column('false') + true, false = literal(True), literal(False) self.assertEquals(testing.db.execute(select([and_(true, false)])).scalar(), False) self.assertEquals(testing.db.execute(select([and_(true, true)])).scalar(), True) diff --git a/test/sql/select.py b/test/sql/select.py index 18f4b91dd..cff8a9d33 100644 --- a/test/sql/select.py +++ b/test/sql/select.py @@ -1097,6 +1097,7 @@ UNION SELECT mytable.myid FROM mytable" s = select([t, literal('lala').label('hoho')]) self.assert_compile(s, "SELECT foo.id, :param_1 AS hoho FROM foo") + assert [str(c) for c in s.c] == ["id", "hoho"] def test_in(self): |
