本文整理汇总了Python中intercom.Intercom.get_users方法的典型用法代码示例。如果您正苦于以下问题:Python Intercom.get_users方法的具体用法?Python Intercom.get_users怎么用?Python Intercom.get_users使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类intercom.Intercom
的用法示例。
在下文中一共展示了Intercom.get_users方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_users_params
# 需要导入模块: from intercom import Intercom [as 别名]
# 或者: from intercom.Intercom import get_users [as 别名]
def test_get_users_params(self):
resp = Intercom.get_users()
ok_('params' in resp)
ok_('page' not in resp['params'])
ok_('per_page' not in resp['params'])
ok_('tag_id' not in resp['params'])
ok_('tag_id' not in resp['params'])
resp = Intercom.get_users(page=20)
ok_('params' in resp)
ok_('page' in resp['params'])
eq_(resp['params']['page'], 20)
resp = Intercom.get_users(per_page=10)
ok_('params' in resp)
ok_('per_page' in resp['params'])
eq_(resp['params']['per_page'], 10)
resp = Intercom.get_users(tag_id=100)
ok_('params' in resp)
ok_('tag_id' in resp['params'])
eq_(resp['params']['tag_id'], 100)
resp = Intercom.get_users(tag_name="starter")
ok_('params' in resp)
ok_('tag_name' in resp['params'])
eq_(resp['params']['tag_name'], "starter")
示例2: test_api_error_when_json_is_invalid
# 需要导入模块: from intercom import Intercom [as 别名]
# 或者: from intercom.Intercom import get_users [as 别名]
def test_api_error_when_json_is_invalid(self):
Intercom.get_users()
示例3: test_api_error
# 需要导入模块: from intercom import Intercom [as 别名]
# 或者: from intercom.Intercom import get_users [as 别名]
def test_api_error(self):
resp = Intercom.get_users()
示例4: test_not_found
# 需要导入模块: from intercom import Intercom [as 别名]
# 或者: from intercom.Intercom import get_users [as 别名]
def test_not_found(self):
resp = Intercom.get_users()
示例5: test_get_users_valid
# 需要导入模块: from intercom import Intercom [as 别名]
# 或者: from intercom.Intercom import get_users [as 别名]
def test_get_users_valid(self):
resp = Intercom.get_users()
self.assertEqual(3, len(resp['users']))
self.assertEqual(3, resp['total_count'])
self.assertEqual(1, resp['total_pages'])