Olemis Lang avatar Olemis Lang committed 818dce5

BH RPC : Instantiate server proxy objects in ticket test cases with the help of functional testers

Setup digest auth bby default

Comments (0)

Files changed (2)

trunk/tracrpc/tests/__init__.py

         return newparts.geturl()
 
 
-    class XmlRpcTransportTester(RpcTesterMixin):
+    class XmlRpcTester(RpcTesterMixin):
         """XML-RPC over HTTP. Supports custom transport.
 
         If transport is mnissing fall back to basic auth, default behavior
             return xmlrpclib.ServerProxy(rpc_url, transport=transport)
 
 
-    class XmlRpcDigestTester(XmlRpcTransportTester):
+    class XmlRpcDigestTester(XmlRpcTester):
         """XML-RPC over HTTP Digest authentication.
 
         Based upon

trunk/tracrpc/tests/ticket.py

     
     def setUp(self):
         TracRpcTestCase.setUp(self)
-        self.anon = xmlrpclib.ServerProxy(self.url_anon)
-        self.user = xmlrpclib.ServerProxy(self.url_user)
-        self.admin = xmlrpclib.ServerProxy(self.url_admin)
+        self.anon = self._tester.server_proxy(self.url_anon)
+        self.user = self._tester.server_proxy(self.url_auth, user='user')
+        self.admin = self._tester.server_proxy(self.url_auth, user='admin')
 
     def tearDown(self):
         TracRpcTestCase.tearDown(self)
     
     def setUp(self):
         TracRpcTestCase.setUp(self)
-        self.anon = xmlrpclib.ServerProxy(self.url_anon)
-        self.user = xmlrpclib.ServerProxy(self.url_user)
-        self.admin = xmlrpclib.ServerProxy(self.url_admin)
+        self.anon = self._tester.server_proxy(self.url_anon)
+        self.user = self._tester.server_proxy(self.url_auth, user='user')
+        self.admin = self._tester.server_proxy(self.url_auth, user='admin')
 
     def tearDown(self):
         TracRpcTestCase.tearDown(self)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.