def test_test_xmlrpc_call(self):
        handler = XMLRPCHandler('api')
        app = Flask(__name__)
        handler.connect(app, '/api')
        handler.register(hello)

        assert (test_xmlrpc_call(app.test_client(), '/api', 'hello') ==
                'Hello, world!')
    def test_call(self):
        handler = XMLRPCHandler('api')
        app = Flask(__name__)
        handler.connect(app, '/api')
        handler.register(hello)

        data = dump_method_call('hello', 'Steve')
        client = app.test_client()
        rv = client.post('/api', data=data, content_type='text/xml')
        res = load_method_response(rv.data)
        assert res == 'Hello, Steve!'
 def test_register(self):
     handler = XMLRPCHandler('api')
     handler.register(hello)
     assert handler.funcs['hello'] is hello
     handler.register(hello, 'hi')
     assert handler.funcs['hi'] is hello