Author: eevans
Date: Wed Mar 30 19:02:52 2011
New Revision: 1087043
URL: http://svn.apache.org/viewvc?rev=1087043&view=rev
Log:
stubbed functional test-case for typed keys
Patch by eevans
Modified:
cassandra/trunk/test/system/test_cql.py
Modified: cassandra/trunk/test/system/test_cql.py
URL:
http://svn.apache.org/viewvc/cassandra/trunk/test/system/test_cql.py?rev=1087043&r1=1087042&r2=1087043&view=diff
==============================================================================
--- cassandra/trunk/test/system/test_cql.py (original)
+++ cassandra/trunk/test/system/test_cql.py Wed Mar 30 19:02:52 2011
@@ -591,3 +591,13 @@ class TestCql(ThriftTester):
""", "test_escaped_quotes")
assert (len(r) == 1) and (len(r[0]) == 1), "wrong number of results"
assert r[0][0].name == "x\'and\'y"
+
+ def test_typed_keys(self):
+ "using typed keys"
+ conn = init()
+ r = conn.execute("SELECT * FROM StandardString1 WHERE KEY = ?", "ka")
+ assert isinstance(r[0].key, unicode), \
+ "wrong key-type returned, expected unicode, got %s" %
type(r[0].key)
+
+ # FIXME: The above is woefully inadequate, but the test config uses
+ # CollatingOrderPreservingPartitioner which only supports UTF8.