another step of moving stuff around where it belongs
[sfa.git] / tests / testInterfaces.py
index 9160637..ce72936 100755 (executable)
@@ -4,10 +4,9 @@ import os
 import random
 import string
 import unittest
-import sfa.util.xmlrpcprotocol as xmlrpc
+import sfa.util.xmlrpcprotocol as xmlrpcprotocol
 from unittest import TestCase
 from optparse import OptionParser
-from sfa.util.xmlrpcprotocol import ServerException
 from sfa.util.xrn import get_authority
 from sfa.util.config import *
 from sfa.trust.certificate import *
@@ -44,10 +43,10 @@ class Client:
         self.cert.save_to_file(cert_file)        
         SFI_AGGREGATE = config.SFI_SM.replace('12347', '12346')
         SFI_CM = 'http://' + options.cm_host + ':12346'
-        self.registry = xmlrpc.get_server(config.SFI_REGISTRY, key_file, cert_file)
-        self.aggregate = xmlrpc.get_server(SFI_AGGREGATE, key_file, cert_file)
-        self.sm = xmlrpc.get_server(config.SFI_SM, key_file, cert_file)
-        self.cm = xmlrpc.get_server(SFI_CM, key_file, cert_file)
+        self.registry = xmlrpcprotocol.server_proxy(config.SFI_REGISTRY, key_file, cert_file)
+        self.aggregate = xmlrpcprotocol.server_proxy(SFI_AGGREGATE, key_file, cert_file)
+        self.sm = xmlrpcprotocol.server_proxy(config.SFI_SM, key_file, cert_file)
+        self.cm = xmlrpcprotocol.server_proxy(SFI_CM, key_file, cert_file)
         self.hrn = config.SFI_USER
         # XX defaulting to user, but this should be configurable so we can
         # test from components persepctive
@@ -171,7 +170,7 @@ class RegistryTest(BasicTestCase):
         server_exception = False 
         try:
             callable(self.credential)
-        except ServerException:
+        except xmlrpcprotocol.ServerException:
             server_exception = True
         finally:
             if self.type in ['user'] and not server_exception: