Fix rapi.testutils unittest
authorIustin Pop <iustin@google.com>
Fri, 27 Apr 2012 09:33:12 +0000 (11:33 +0200)
committerIustin Pop <iustin@google.com>
Fri, 27 Apr 2012 09:46:25 +0000 (11:46 +0200)
Since we use a testutils.InputTestClient(), then the actual error
expected is VerificationError, and not GanetiApiError (which is used
at real run-time).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>

test/ganeti.rapi.testutils_unittest.py

index d26bd19..8d68b03 100755 (executable)
@@ -129,7 +129,7 @@ class TestInputTestClient(unittest.TestCase):
     result = self.cl.PrepareExport("inst1.example.com",
                                    constants.EXPORT_MODE_LOCAL)
     self.assertTrue(result is NotImplemented)
-    self.assertRaises(rapi.client.GanetiApiError, self.cl.PrepareExport,
+    self.assertRaises(rapi.testutils.VerificationError, self.cl.PrepareExport,
                       "inst1.example.com", "###invalid###")
 
   def testGetJobs(self):