From 2004e673aafe48c16c67a58ff0ce67a6c11cd9bb Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 6 Apr 2010 17:38:27 +0200
Subject: [PATCH] Fix unittest for the rapi client library

Wrong escape, so we make sure to use proper escapes (we want the
backslashes to be embedded, not interpreted). Also change " to ' to be
easier to read.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: David Knowles <dknowles@google.com>
---
 test/ganeti.rapi.client_unittest.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/ganeti.rapi.client_unittest.py b/test/ganeti.rapi.client_unittest.py
index ed0d7779c..66f5fbbd1 100755
--- a/test/ganeti.rapi.client_unittest.py
+++ b/test/ganeti.rapi.client_unittest.py
@@ -310,8 +310,8 @@ class GanetiRapiClientTests(unittest.TestCase):
     self.assertDryRun()
 
   def testGetJobs(self):
-    self.rapi.AddResponse("[ { \"id\": \"123\", \"uri\": \"\/2\/jobs\/123\" },"
-                          " { \"id\": \"124\", \"uri\": \"\2\/jobs\/124\" } ]")
+    self.rapi.AddResponse('[ { "id": "123", "uri": "\\/2\\/jobs\\/123" },'
+                          '  { "id": "124", "uri": "\\/2\\/jobs\\/124" } ]')
     self.assertEqual([123, 124], self.client.GetJobs())
     self.assertHandler(rlib2.R_2_jobs)
 
-- 
GitLab