Revision: ef34a87db21b
Author:   Nick Bailey <[email protected]>
Date:     Sat Jul  7 12:11:49 2012
Log:      Unit test for prepared select.

http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/source/detail?r=ef34a87db21b

Modified:
 /test/test_prepared_queries.py

=======================================
--- /test/test_prepared_queries.py      Sat Mar 24 13:09:16 2012
+++ /test/test_prepared_queries.py      Sat Jul  7 12:11:49 2012
@@ -92,6 +92,18 @@
         results = self.cursor.fetchone()
         self.assertEqual(results[2], '\x00\xff\x80\x08')

+    def test_prepared_select_no_terms(self):
+        if self.cursor is None:
+            return
+
+ q = self.cursor.prepare_query("select thekey, thedecimal, theblob from abc")
+
+        self.cursor.execute_prepared(q, {})
+        results = self.cursor.fetchall()
+        floats = set(row[1] for row in results)
+
+        self.assertEqual(set([None, decimal.Decimal('-14.400')]), floats)
+
     def test_prepared_insert(self):
         if self.cursor is None:
             return

Reply via email to