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


Python tc.go函数代码示例

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


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


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