Commits

Olemis Lang committed 1fcab53

BH RPC : XML-RPC error codes in test cases

  • Participants
  • Parent commits 5bd64a1

Comments (0)

Files changed (2)

File trunk/tracrpc/tests/__init__.py

         @staticmethod
         def tester_class(baseurl):
             # FIXME: Parameterize test runs to activate JSON-RPC
-            return DefaultJsonRpcTester(baseurl, skiplogin=True)
-            #return DefaultXmlRpcTester(baseurl, skiplogin=True)
+            #return DefaultJsonRpcTester(baseurl, skiplogin=True)
+            return DefaultXmlRpcTester(baseurl, skiplogin=True)
 
         def testenv_path(self, port=None):
             if port is None:

File trunk/tracrpc/tests/json_rpc.py

             self.assertTrue(result['error'])
             self.assertEquals(result['id'], 'wrong-args')
             self.assertEquals(None, result['result'])
-            self.assertEquals(-32603, result['error']['code'])
+            self.assertEquals(-32602, result['error']['code'])
             self.assertTrue('listMethods() takes exactly 2 arguments' \
                                 in result['error']['message'])
 
             self.assertEquals(result['error']['code'], 404)
             self.assertEquals(result['error']['message'],
                      'Ticket 2147483647 does not exist.')
-            # A Wiki resource
+            # A Wiki resource (http://www.ecyrd.com/JSPWiki/wiki/WikiRPCInterface2)
             result = self._anon_req({'method': 'wiki.getPage',
                     'params': ["Test", 10], 'id': 3443})
-            self.assertEquals(result['error']['code'], 404)
+            self.assertEquals(result['error']['code'], 1)
             self.assertEquals(result['error']['message'],
                      'Wiki page "Test" does not exist at version 10')