test_jenkins_set_options.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:bob 作者: BobBuildTool 项目源码 文件源码
def testShortDescription(self):
        self.createComplexRecipes()
        self.executeBobJenkinsCmd("set-options --shortdescription myTestJenkinsComplex")
        self.executeBobJenkinsCmd("push -q myTestJenkinsComplex")
        send = self.jenkinsMock.getServerData()
        result_set = set()
        try:
            for i in send:
                if i[0] == '/createItem?name=dependency-two':
                    for items in ElementTree.fromstring(i[1]).iter('description'):

                        for line in [x for x in items.itertext()][0].splitlines():
                            if line.startswith('<li>') and line.endswith('</li>'):
                                result_set.add(line[4:-5])
        except:
            print("Malformed Data Recieved")

        self.assertEqual(result_set, {'root/dependency-one/dependency-two'})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号