[CalendarServer-changes] [6780] CalendarServer/branches/users/glyph/dal/txdav/base/datastore/test/ test_sqlsyntax.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Jan 19 12:59:58 PST 2011


Revision: 6780
          http://trac.macosforge.org/projects/calendarserver/changeset/6780
Author:   glyph at apple.com
Date:     2011-01-19 12:59:58 -0800 (Wed, 19 Jan 2011)
Log Message:
-----------
test for multi-column selection

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/dal/txdav/base/datastore/test/test_sqlsyntax.py

Modified: CalendarServer/branches/users/glyph/dal/txdav/base/datastore/test/test_sqlsyntax.py
===================================================================
--- CalendarServer/branches/users/glyph/dal/txdav/base/datastore/test/test_sqlsyntax.py	2011-01-19 20:59:47 UTC (rev 6779)
+++ CalendarServer/branches/users/glyph/dal/txdav/base/datastore/test/test_sqlsyntax.py	2011-01-19 20:59:58 UTC (rev 6780)
@@ -113,7 +113,7 @@
 
     def test_columnSelection(self):
         """
-        If columns are specified by the argument to L{Select}, those will be
+        If a column is specified by the argument to L{Select}, those will be
         output by the SQL statement rather than the all-columns wildcard.
         """
         self.assertEquals(
@@ -122,3 +122,17 @@
             SQLStatement("select BAR from FOO")
         )
 
+
+    def test_multiColumnSelection(self):
+        """
+        If multiple columns are specified by the argument to L{Select}, those
+        will be output by the SQL statement rather than the all-columns
+        wildcard.
+        """
+        self.assertEquals(
+            Select([self.schema.FOO.BAZ,
+                    self.schema.FOO.BAR],
+                   From=self.schema.FOO).toSQL(),
+            SQLStatement("select BAZ, BAR from FOO")
+        )
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110119/7de9034c/attachment-0001.html>


More information about the calendarserver-changes mailing list