File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,11 @@ class OperationProxy(object):
1313 def __init__ (self , service_proxy , operation_name ):
1414 self ._proxy = service_proxy
1515 self ._op_name = operation_name
16- self .__doc__ = 'OperationProxy for %s' % operation_name
16+ try :
17+ signature = str (self ._proxy ._binding ._operations [operation_name ])
18+ self .__doc__ = signature
19+ except :
20+ self .__doc__ = 'OperationProxy for %s' % operation_name
1721
1822 def __call__ (self , * args , ** kwargs ):
1923 """Call the operation with the given args and kwargs.
Original file line number Diff line number Diff line change @@ -49,6 +49,14 @@ def test_service_proxy_dir_operations():
4949 assert set (operations ) == set (['GetLastTradePrice' , 'GetLastTradePriceNoOutput' ])
5050
5151
52+ def test_operation_proxy_doc ():
53+ client_obj = client .Client ('tests/wsdl_files/soap.wsdl' )
54+ assert (client_obj .service .GetLastTradePrice .__doc__
55+ == 'GetLastTradePrice(tickerSymbol: xsd:string, '
56+ 'account: ns0:account, '
57+ 'country: ns0:country) -> price: xsd:float' )
58+
59+
5260def test_open_from_file_object ():
5361 with open ('tests/wsdl_files/soap_transport_err.wsdl' , 'rb' ) as fh :
5462 client_obj = client .Client (fh )
You can’t perform that action at this time.
0 commit comments