Updated Branches:
  refs/heads/cassandra-1.2 6d7404bc2 -> 87450cb13

Fix clqsh test_prompt


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/87450cb1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/87450cb1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/87450cb1

Branch: refs/heads/cassandra-1.2
Commit: 87450cb13e6cab141e24f430db5532adcf18751c
Parents: 26c65e6
Author: Aleksey Yeschenko <alek...@apache.org>
Authored: Wed May 29 21:01:17 2013 +0300
Committer: Aleksey Yeschenko <alek...@apache.org>
Committed: Wed May 29 21:01:58 2013 +0300

----------------------------------------------------------------------
 pylib/cqlshlib/test/test_cqlsh_output.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/87450cb1/pylib/cqlshlib/test/test_cqlsh_output.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/test/test_cqlsh_output.py 
b/pylib/cqlshlib/test/test_cqlsh_output.py
index e67cc9c..6ca251e 100644
--- a/pylib/cqlshlib/test/test_cqlsh_output.py
+++ b/pylib/cqlshlib/test/test_cqlsh_output.py
@@ -636,14 +636,14 @@ class TestCqlshOutput(BaseTestCase):
         ), cqlver=(2, 3))
 
     def test_prompt(self):
-        with testrun_cqlsh(tty=True, keyspace=None, cqlver=2) as c:
+        with testrun_cqlsh(tty=True, keyspace=None, cqlver=3) as c:
             self.assertEqual(c.output_header.splitlines()[-1], 'cqlsh> ')
 
             c.send('\n')
             output = c.read_to_next_prompt().replace('\r\n', '\n')
             self.assertEqual(output, '\ncqlsh> ')
 
-            cmd = "USE '%s';\n" % get_test_keyspace().replace("'", "''")
+            cmd = 'USE "%s";\n' % get_test_keyspace().replace('"', '""')
             c.send(cmd)
             output = c.read_to_next_prompt().replace('\r\n', '\n')
             self.assertEqual(output, '%scqlsh:%s> ' % (cmd, 
get_test_keyspace()))
@@ -655,10 +655,10 @@ class TestCqlshOutput(BaseTestCase):
             c.send('use NONEXISTENTKEYSPACE;\n')
             outputlines = c.read_to_next_prompt().splitlines()
             self.assertEqual(outputlines[0], 'use NONEXISTENTKEYSPACE;')
-            self.assertEqual(outputlines[3], 'cqlsh:system> ')
+            self.assertEqual(outputlines[2], 'cqlsh:system> ')
             midline = ColoredText(outputlines[1])
             self.assertEqual(midline.plain(),
-                             "Bad Request: Keyspace 'NONEXISTENTKEYSPACE' does 
not exist")
+                             "Bad Request: Keyspace 'nonexistentkeyspace' does 
not exist")
             self.assertColorFromTags(midline,
                              
"RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR")
 

Reply via email to