当前位置: 首页>>代码示例>>Python>>正文


Python Viewer.summary方法代码示例

本文整理汇总了Python中viewer.Viewer.summary方法的典型用法代码示例。如果您正苦于以下问题:Python Viewer.summary方法的具体用法?Python Viewer.summary怎么用?Python Viewer.summary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在viewer.Viewer的用法示例。


在下文中一共展示了Viewer.summary方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: submit

# 需要导入模块: from viewer import Viewer [as 别名]
# 或者: from viewer.Viewer import summary [as 别名]
def submit():
    '''
    Submit a ticket into mantis with the given issue data.
    Content-Type:application/json
    If submit successful, attach the ticket url to the issue data.
    @param JSON format string: e.g: {"record_id":88888,"server":"borqsbt","project":{"id":7,"name":"ART-T2-Acer"},"username":"b999","password":"123456","category":"Unknown","reproducibility":{"id":50,"name":"random"},"severity":{"id":40,"name":"5-minor"},"priority":{"id":20,"name":"5-low"},"summary":"[BugReporter]Update test code","description":"Update test code","customfield":[{"id": 1, "name": "Phase","value":"Unit Test"},{"id": 2, "name": "Sub Categories","value":"TestFramewrok-Testware"},{"id": 4, "name": "Type","value":"enhancement"}]}
    @return If successful,return a url point to the ticket,otherwise, return error info.
    '''
    record_id,url=mantis.submit()
    print "record_id=%s,url=%s"%(record_id,url)
    proxy.set_ticket_url(record_id,url)    
    return json.dumps({"results":{"url":url}})



 
if (__name__ == '__main__'):
    ##print 'Run bugreport server in main mode!'
    #debug(True)
    #run(app,host='0.0.0.0', port=8080, reloader=True)
    user='460001010203114'
    linkTemplate="errors?imsi=%s&date=%s"
    conditions={'imsi':user}
    data = viewer.summary(conditions)
    print data
    if not 'error' in data:
        result=getUserData(user,linkTemplate,data)
        print "result:\n%s"%result


开发者ID:liuct,项目名称:bugquery-lt,代码行数:30,代码来源:api.py


注:本文中的viewer.Viewer.summary方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。