]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(no commit message)
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 1 Nov 2005 04:02:31 +0000 (04:02 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 1 Nov 2005 04:02:31 +0000 (04:02 +0000)
test/select.py

index d66c232cfe3b1821bd5415e90f21721581729d09..3c626eaf9d66e680c71cacc2bf34f722a72589ea 100644 (file)
@@ -124,13 +124,15 @@ sq.myothertable_othername AS sq_myothertable_othername FROM (" + sqstring + ") s
         )
 
     def testor(self):
+
         self.runtest(
             select([table], and_(
                 table.c.id == 12,
                 or_(table2.c.name=='asdf', table2.c.name == 'foo', table2.c.id == 9),
                 "sysdate() = today()", 
             )),
-            "SELECT mytable.myid, mytable.name, mytable.description FROM mytable, myothertable WHERE mytable.myid = :mytable_myid AND (myothertable.othername = :myothertable_othername OR myothertable.othername = :myothertable_othername_1 OR myothertable.otherid = :myothertable_otherid) AND sysdate() = today()"
+            "SELECT mytable.myid, mytable.name, mytable.description FROM mytable, myothertable WHERE mytable.myid = :mytable_myid AND (myothertable.othername = :myothertable_othername OR myothertable.othername = :myothertable_othername_1 OR myothertable.otherid = :myothertable_otherid) AND sysdate() = today()",
+            checkparams = {'myothertable_othername': 'asdf', 'myothertable_othername_1':'foo', 'myothertable_otherid': 9, 'mytable_myid': 12}
         )
 
 
@@ -154,7 +156,7 @@ sq.myothertable_othername AS sq_myothertable_othername FROM (" + sqstring + ") s
         # create a select for a join of two tables.  use_labels means the column names will have
         # labels tablename_columnname, which become the column keys accessible off the Selectable object.
         # also, only use one column from the second table and all columns from the first table.
-        q = select([table, table2.c.id], table.c.id == table2.c.id, use_labels = True)
+        q = select([table, table2.c.id], table.c.id == table2.c.id, use_labels = False)
         
         # make an alias of the "selectable".  column names stay the same (i.e. the labels), table name "changes" to "t2view".
         a = alias(q, 't2view')