本文整理汇总了Python中astakosclient.AstakosClient._call_astakos方法的典型用法代码示例。如果您正苦于以下问题:Python AstakosClient._call_astakos方法的具体用法?Python AstakosClient._call_astakos怎么用?Python AstakosClient._call_astakos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astakosclient.AstakosClient
的用法示例。
在下文中一共展示了AstakosClient._call_astakos方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _invalid_url
# 需要导入模块: from astakosclient import AstakosClient [as 别名]
# 或者: from astakosclient.AstakosClient import _call_astakos [as 别名]
def _invalid_url(self, pool):
global token, auth_url
try:
client = AstakosClient(token['id'], auth_url, use_pool=pool)
client._call_astakos("/astakos/api/misspelled")
except NotFound:
pass
except Exception, e:
self.fail("Got \"%s\" instead of 404" % e)
示例2: _get_user_catalogs
# 需要导入模块: from astakosclient import AstakosClient [as 别名]
# 或者: from astakosclient.AstakosClient import _call_astakos [as 别名]
def _get_user_catalogs(self, pool):
global token, auth_url, api_usercatalogs
try:
client = AstakosClient(token['id'], auth_url, use_pool=pool)
client._call_astakos(api_usercatalogs)
except BadRequest:
pass
except Exception:
self.fail("Should have returned 400 (Method not allowed)")
else:
self.fail("Should have returned 400 (Method not allowed)")
示例3: _get_authenticate
# 需要导入模块: from astakosclient import AstakosClient [as 别名]
# 或者: from astakosclient.AstakosClient import _call_astakos [as 别名]
def _get_authenticate(self, pool):
global token, auth_url
try:
client = AstakosClient(token['id'], auth_url, use_pool=pool)
client._call_astakos(api_tokens, method="GET")
except BadRequest:
pass
except Exception:
self.fail("Should have returned 400 (Method not allowed)")
else:
self.fail("Should have returned 400 (Method not allowed)")