• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python tc.go函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中trac.tests.functional.tc.go函数的典型用法代码示例。如果您正苦于以下问题:Python go函数的具体用法?Python go怎么用?Python go使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: runTest

 def runTest(self):
     self._tester.login_as(Usernames.admin)
     page_url = self._tester.url + '/admin/agilo/types/requirement'
     tc.go(page_url)
     
     html = tc.show()
     assert "sum:get_outgoing.rd_points|type=story|story_priority=Mandatory" in html
开发者ID:djangsters,项目名称:agilo,代码行数:7,代码来源:custom_field_admin_test.py


示例2: runTest

    def runTest(self):
        """Admin modify priority details"""
        name = "DetailPriority"
        # Create a priority
        self._tester.create_priority(name + '1')

        # Modify the details of the priority
        priority_url = self._tester.url + "/admin/ticket/priority"
        tc.go(priority_url)
        tc.url(priority_url + '$')
        tc.follow(name + '1')
        tc.url(priority_url + '/' + name + '1')
        tc.formvalue('edit', 'name', name + '2')
        tc.submit('save')
        tc.url(priority_url + '$')

        # Cancel more modifications
        tc.go(priority_url)
        tc.follow(name)
        tc.formvalue('edit', 'name', name + '3')
        tc.submit('cancel')
        tc.url(priority_url + '$')

        # Verify that only the correct modifications show up
        tc.notfind(name + '1')
        tc.find(name + '2')
        tc.notfind(name + '3')
开发者ID:pkdevbox,项目名称:trac,代码行数:27,代码来源:admin.py


示例3: runTest

 def runTest(self):
     self._tester.login_as(Usernames.admin)
     # get page for editing requirement ticket type
     page_url = self._tester.url + '/admin/agilo/types/requirement'
     tc.go(page_url)
     tc.url(page_url)
     tc.code(200)
     tc.find('requirement')
     tc.find('Alias:')
     
     # test default field
     tc.find('name="fields" value="businessvalue" checked="checked"')
     
     # change alias and fields and save
     tc.formvalue('modcomp', 'fields', '+priority')
     tc.formvalue('modcomp', 'fields', '-businessvalue')
     tc.formvalue('modcomp', 'fields', '-milestone')
     tc.formvalue('modcomp', 'fields', '-keywords')
     tc.submit('save')
     
     # redirects to list page, now only the priority should be selected
     tc.find('<td class="fields">[\n ]*Priority<br />[\n ]*</td>')
     
     tc.go(page_url)
     # We must ensure that these fields are available for later tests.
     tc.formvalue('modcomp', 'fields', '+businessvalue')
     tc.formvalue('modcomp', 'fields', '+milestone')
     tc.submit('save')
开发者ID:djangsters,项目名称:agilo,代码行数:28,代码来源:type_admin_test.py


示例4: runTest

    def runTest(self):
        env = self._testenv.get_trac_environment()
        env.config.set('components', 'RaiseExceptionPlugin.*', 'enabled')
        env.config.save()
        create_file(os.path.join(env.path, 'plugins', 'RaiseExceptionPlugin.py'),
"""\
from trac.core import Component, implements
from trac.web.api import IRequestHandler

url = 'http://trac-hacks.org/wiki/HelloWorldMacro'

class RaiseExceptionPlugin(Component):
    implements(IRequestHandler)

    def match_request(self, req):
        if req.path_info == '/raise-exception':
            return True

    def process_request(self, req):
        raise Exception

""")

        try:
            tc.go(self._tester.url + '/raise-exception')
            tc.find(internal_error)
            tc.find('<form class="newticket" method="get" '
                    'action="http://trac-hacks.org/newticket">')
            tc.find('<input type="hidden" name="component" '
                    'value="HelloWorldMacro" />')
        finally:
            env.config.set('components', 'RaiseExceptionPlugin.*', 'disabled')
开发者ID:pkdevbox,项目名称:trac,代码行数:32,代码来源:testcases.py


示例5: runTest

 def runTest(self):
     """Verify browser log for a new file"""
     tempfilename = random_word() + '_new.txt'
     fulltempfilename = 'component1/trunk/' + tempfilename
     revision = self._testenv.svn_add(fulltempfilename, '')
     tc.go(self._tester.url + '/log/' + fulltempfilename)
     tc.find('@%d' % revision)
     tc.find('Add %s' % fulltempfilename)
开发者ID:exocad,项目名称:exotrac,代码行数:8,代码来源:functional.py


示例6: _test_adding_a_backlog

 def _test_adding_a_backlog(self, page_url, backlog_name):
     tc.go(page_url)
     tc.url(page_url)
     tc.fv('addbacklog', 'name', backlog_name)
     tc.submit('add')
     # we're at the edit page
     backlog_url = page_url + '/' + backlog_name
     tc.url(backlog_url)
开发者ID:djangsters,项目名称:agilo,代码行数:8,代码来源:backlog_admin_test.py


示例7: runTest

 def runTest(self):
     """Verify browser log for a new file"""
     tempfilename = random_word() + "_new.txt"
     fulltempfilename = "component1/trunk/" + tempfilename
     revision = self._testenv.svn_add(fulltempfilename, "")
     tc.go(self._tester.url + "/log/" + fulltempfilename)
     tc.find("@%d" % revision)
     tc.find("Add %s" % fulltempfilename)
开发者ID:pkdevbox,项目名称:trac,代码行数:8,代码来源:functional.py


示例8: download_as_csv

 def download_as_csv(self):
     url_template = '%(prefix)s/%(backlog)s'
     backlog_path = url_template % dict(prefix=BACKLOG_URL, backlog='Product Backlog')
     url = self.tester.url + unicode_quote(backlog_path) + '?format=csv'
     tc.go(url)
     tc.code(200)
     csv_export = tc.show()
     csvfile = CSVFile(StringIO(csv_export), None, 'UTF-8')
     return csvfile
开发者ID:djangsters,项目名称:agilo,代码行数:9,代码来源:backlog_csv_export.py


示例9: runTest

 def runTest(self):
     default_handler = self._testenv.get_config("trac", "default_handler")
     self._testenv.set_config("trac", "default_handler", "PreferencesModule")
     try:
         tc.go(self._tester.url)
         tc.notfind(internal_error)
         tc.find(r"\bPreferences\b")
     finally:
         self._testenv.set_config("trac", "default_handler", default_handler)
开发者ID:exocad,项目名称:exotrac,代码行数:9,代码来源:functional.py


示例10: runTest

 def runTest(self):
     self._tester.login_as(Usernames.team_member)
     page_url = self._tester.url + TEAM_URL
     tc.go(page_url)
     tc.url(page_url)
     tc.code(200)
     tc.follow('Team#1')
     tc.code(200)
     tc.find('Member#1')
开发者ID:djangsters,项目名称:agilo,代码行数:9,代码来源:team_test.py


示例11: runTest

 def runTest(self):
     """Test for regression of http://trac.edgewall.org/ticket/11518
     ResourceNotFound should be raised when version is invalid.
     """
     tc.go(self._tester.url + '/wiki/WikiStart?version=1abc')
     tc.find(r"<h1>Trac Error</h1>")
     tc.find('No version "1abc" for Wiki page "WikiStart')
     tc.go(self._tester.url + '/wiki/WikiStart?version=')
     tc.find(r"<h1>Trac Error</h1>")
     tc.find('No version "" for Wiki page "WikiStart')
开发者ID:exocad,项目名称:exotrac,代码行数:10,代码来源:functional.py


示例12: runTest

    def runTest(self):
        self.tester.login_as(Usernames.admin)
        tc.go("backlog/Sprint%20Backlog?bscope=non-existing-sprint")
        tc.code(500)
        tc.find("Invalid Sprint name")
        try:
            tc.notfind("trac.edgewall.org/newticket")
        except TwillAssertionError:
            raise Exception("Found a link to the official trac bug tracking platform")

        tc.find("trac-hacks.org/newticket")
开发者ID:djangsters,项目名称:agilo,代码行数:11,代码来源:bug_reporting_test.py


示例13: runTest

 def runTest(self):
     tc.go(self.tester.url + '/admin/ticket/milestones/' + unicode_quote(self.milestone_name()))
     new_name = self.milestone_name() + 'Renamed'
     tc.formvalue('modifymilestone', 'name', new_name)
     tc.submit('save')
     tc.code(200)
     # Now we expect that the ticket and the sprint have updated milestone
     ticket_page = self.tester.navigate_to_ticket_page(self.tkt_id)
     self.assert_equals(new_name, ticket_page.milestone())
     self.tester.go_to_sprint_edit_page("SprintFor" + self.milestone_name())
     tc.find('for milestone %s</h1>' % new_name)
开发者ID:djangsters,项目名称:agilo,代码行数:11,代码来源:rename_milestone_test.py


示例14: runTest

 def runTest(self):
     default_handler = self._testenv.get_config('trac', 'default_handler')
     self._testenv.set_config('trac', 'default_handler',
                              'PreferencesModule')
     try:
         tc.go(self._tester.url)
         tc.notfind(internal_error)
         tc.find(r"\bPreferences\b")
     finally:
         self._testenv.set_config('trac', 'default_handler',
                                  default_handler)
开发者ID:pkdevbox,项目名称:trac,代码行数:11,代码来源:functional.py


示例15: runTest

    def runTest(self):
        self._tester.login_as(Usernames.admin)

        page_url = self.go_to_admin_links_page()
        # see if one of the default links is there
        tc.find('story-task">Task</a>')
        
        # check if the alias module works correctly, reload the page
        tc.go(page_url)
        tc.find('story-task">Task</a>')

        self.create_link('Bug', 'Requirement', 'bug', 'requirement')
开发者ID:djangsters,项目名称:agilo,代码行数:12,代码来源:link_admin_test.py


示例16: runTest

    def runTest(self):
        self._tester.logout()
        self._tester.login('user')
        page_name = self._tester.create_wiki_page()
        permission_policies = \
            self._testenv.get_config('trac', 'permission_policies')
        readonly_checkbox = '<input type="checkbox" name="readonly" ' + \
                            'id="readonly" />'
        attach_button = '<input type="submit" id="attachfilebutton" ' + \
                        'value="Attach.+file" />'
        try:
            # User without WIKI_ADMIN can't set a page read-only
            tc.formvalue('modifypage', 'action', 'edit')
            tc.submit()
            tc.notfind(readonly_checkbox)

            # User with WIKI_ADMIN can set a page read-only
            # and still edit that page
            self._testenv.grant_perm('user', 'WIKI_ADMIN')
            self._tester.go_to_wiki(page_name)
            tc.formvalue('modifypage', 'action', 'edit')
            tc.submit()
            tc.find(readonly_checkbox)
            tc.formvalue('edit', 'readonly', True)
            tc.submit('save')
            tc.go(self._tester.url + '/attachment/wiki/' + page_name)
            tc.find(attach_button)
            self._tester.edit_wiki_page(page_name)

            # User without WIKI_ADMIN can't edit a read-only page
            self._testenv.revoke_perm('user', 'WIKI_ADMIN')
            self._tester.go_to_wiki(page_name)
            tc.notfind('<input type="submit" value="Edit this page">')
            tc.go(self._tester.url + '/attachment/wiki/' + page_name)
            tc.notfind(attach_button)

            # Read-only checkbox is not present when ReadonlyWikiPolicy
            # is not in the list of active permission policies
            pp_list = [p.strip() for p in permission_policies.split(',')]
            pp_list.remove('ReadonlyWikiPolicy')
            self._testenv._tracadmin('trac', 'permission_policies',
                                     ', '.join(pp_list))
            self._testenv.grant_perm('user', 'WIKI_ADMIN')
            self._tester.go_to_wiki(page_name)
            tc.formvalue('modifypage', 'action', 'edit')
            tc.submit()
            tc.notfind(readonly_checkbox)
        finally:
            self._testenv.set_config('trac', 'permission_policies',
                                     permission_policies)
            self._testenv.revoke_perm('user', 'WIKI_ADMIN')
            self._tester.logout()
            self._tester.login('admin')
开发者ID:pkdevbox,项目名称:trac,代码行数:53,代码来源:functional.py


示例17: runTest

 def runTest(self):
     self._tester.login_as(Usernames.product_owner)
     dashboard_url = self._tester.url + DASHBOARD_URL
     tc.go(dashboard_url)
     tc.code(200)
     
     self._tester.logout()
     tc.go(dashboard_url)
     tc.code(403)
     
     self._tester.go_to_front()
     tc.notfind('href="%s"' % DASHBOARD_URL)
开发者ID:djangsters,项目名称:agilo,代码行数:12,代码来源:dashboard_test.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python tc.notfind函数代码示例发布时间:2022-05-27
下一篇:
Python tc.formvalue函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap