本文整理匯總了Python中amazonproduct.api.API.host方法的典型用法代碼示例。如果您正苦於以下問題:Python API.host方法的具體用法?Python API.host怎麽用?Python API.host使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類amazonproduct.api.API
的用法示例。
在下文中一共展示了API.host方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: pytest_funcarg__api
# 需要導入模塊: from amazonproduct.api import API [as 別名]
# 或者: from amazonproduct.api.API import host [as 別名]
def pytest_funcarg__api(request):
server = request.getfuncargvalue('server')
api = API('XXX', 'XXX', 'uk') # locale does not matter here!
api.host = '%s:%s' % server.server_address
if hasattr(request, 'param'): # for tests generated by pytest_generate_tests
api.VERSION = request.param['version']
api.REQUESTS_PER_SECOND = 10000 # just for here!
return api
示例2: pytest_funcarg__api
# 需要導入模塊: from amazonproduct.api import API [as 別名]
# 或者: from amazonproduct.api.API import host [as 別名]
def pytest_funcarg__api(request):
server = request.getfuncargvalue("server")
api = API("XXX", "XXX", "uk") # locale does not matter here!
api.host = "%s:%s" % server.server_address
if hasattr(request, "param"): # for tests generated by pytest_generate_tests
api.VERSION = request.param["version"]
api.REQUESTS_PER_SECOND = 10000 # just for here!
return api