Beispiel #1
0
 def test_success(self):
     from supervisor import xmlrpc
     L = []
     class Dummy:
         def foo(self, a):
             L.append(a)
     dummy = Dummy()
     xmlrpc.traverse(dummy, 'foo', [1])
     self.assertEqual(L, [1])
Beispiel #2
0
 def test_success(self):
     from supervisor import xmlrpc
     class Root:
         pass
     class A:
         def hello(self, name):
             return "Hello %s" % name
     root = Root()
     root.a = A()
     result = xmlrpc.traverse(root, 'a.hello', ["there"])
     self.assertEqual(result, "Hello there")
Beispiel #3
0
 def test_success(self):
     from supervisor import xmlrpc
     class Root:
         pass
     class A:
         def hello(self, name):
             return "Hello %s" % name
     root = Root()
     root.a = A()
     result = xmlrpc.traverse(root, 'a.hello', ["there"])
     self.assertEqual(result, "Hello there")