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


Python tc.notfind函数代码示例

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


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

示例1: runTest

 def runTest(self):
     """Test for regression of http://trac.edgewall.org/ticket/11069
     The permissions list should only be populated with permissions that
     the user can grant."""
     self._tester.go_to_front()
     self._tester.logout()
     self._tester.login('user')
     self._testenv.grant_perm('user', 'PERMISSION_GRANT')
     env = self._testenv.get_trac_environment()
     from trac.perm import PermissionSystem
     user_perms = PermissionSystem(env).get_user_permissions('user')
     all_actions = PermissionSystem(env).get_actions()
     try:
         self._tester.go_to_admin("Permissions")
         for action in all_actions:
             option = r"<option>%s</option>" % action
             if action in user_perms and user_perms[action] is True:
                 tc.find(option)
             else:
                 tc.notfind(option)
     finally:
         self._testenv.revoke_perm('user', 'PERMISSION_GRANT')
         self._tester.go_to_front()
         self._tester.logout()
         self._tester.login('admin')
开发者ID:exocad,项目名称:exotrac,代码行数:25,代码来源:functional.py

示例2: runTest

 def runTest(self):
     self._tester.login_as(Usernames.team_member)
     self._tester.go_to_new_ticket_page(Type.TASK)
     tc.formvalue('propertyform', 'summary', 'Foo Summary')
     tc.submit('preview')
     tc.notfind('Business Value Points')
     tc.notfind('User Story Priority')
开发者ID:djangsters,项目名称:agilo,代码行数:7,代码来源:ticket_gui_test.py

示例3: runTest

    def runTest(self):
        """Add a user to a permissions group"""
        self._tester.go_to_admin("Permissions")
        tc.find('Manage Permissions')
        tc.formvalue('addsubj', 'sg_subject', 'authenticated')
        tc.formvalue('addsubj', 'sg_group', 'somegroup')
        tc.submit()
        authenticated = unicode_to_base64('authenticated')
        somegroup = unicode_to_base64('somegroup')
        tc.find('%s:%s' % (authenticated, somegroup))

        revoke_checkbox = '%s:%s' % (unicode_to_base64('anonymous'),
                                     unicode_to_base64('PERMISSION_GRANT'))
        tc.formvalue('addperm', 'gp_subject', 'anonymous')
        tc.formvalue('addperm', 'action', 'PERMISSION_GRANT')
        tc.submit()
        tc.find(revoke_checkbox)
        self._testenv.get_trac_environment().config.touch()
        self._tester.logout()
        self._tester.go_to_admin("Permissions")
        try:
            tc.formvalue('addsubj', 'sg_subject', 'someuser')
            tc.formvalue('addsubj', 'sg_group', 'authenticated')
            tc.submit()
            tc.find("The subject someuser was not added to the "
                    "group authenticated because the group has "
                    "TICKET_CHGPROP permission and users cannot "
                    "grant permissions they don't possess.")
        finally:
            self._tester.login('admin')
            self._tester.go_to_admin("Permissions")
            tc.formvalue('revokeform', 'sel', revoke_checkbox)
            tc.submit()
            tc.notfind(revoke_checkbox)
开发者ID:pkdevbox,项目名称:trac,代码行数:34,代码来源:functional.py

示例4: 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

示例5: runTest

    def runTest(self):
        """Test for regression of http://trac.edgewall.org/ticket/7209"""
        ticketid = self._tester.create_ticket()
        self._tester.create_ticket()
        self._tester.add_comment(ticketid)
        self._tester.attach_file_to_ticket(ticketid, filename='hello.txt',
                                           description='Preserved Descr')
        self._tester.go_to_ticket(ticketid)
        tc.find('Preserved Descr')
        # Now replace the existing attachment, and the description should come
        # through.
        self._tester.attach_file_to_ticket(ticketid, filename='hello.txt',
                                           description='', replace=True)
        self._tester.go_to_ticket(ticketid)
        tc.find('Preserved Descr')

        self._tester.attach_file_to_ticket(ticketid, filename='blah.txt',
                                           description='Second Attachment')
        self._tester.go_to_ticket(ticketid)
        tc.find('Second Attachment')

        # This one should get a new description when it's replaced
        # (Second->Other)
        self._tester.attach_file_to_ticket(ticketid, filename='blah.txt',
                                           description='Other Attachment',
                                           replace=True)
        self._tester.go_to_ticket(ticketid)
        tc.find('Other Attachment')
        tc.notfind('Second Attachment')
开发者ID:pkdevbox,项目名称:trac,代码行数:29,代码来源:testcases.py

示例6: runTest

 def runTest(self):
     """Set preferences for admin user"""
     self._tester.go_to_preferences()
     try:
         tc.notfind('Your preferences have been saved.')
         tc.formvalue('userprefs', 'name', ' System Administrator ')
         tc.formvalue('userprefs', 'email', ' [email protected] ')
         tc.submit()
         tc.find('Your preferences have been saved.')
         self._tester.go_to_preferences("Localization")
         tc.formvalue('userprefs', 'tz', 'GMT -10:00')
         tc.submit()
         tc.find('Your preferences have been saved.')
         self._tester.go_to_preferences()
         tc.notfind('Your preferences have been saved.')
         tc.find('value="System Administrator"')
         tc.find(r'value="[email protected]\.com"')
         self._tester.go_to_preferences("Localization")
         tc.find('GMT -10:00')
     finally:
         self._tester.go_to_preferences()
         tc.formvalue('userprefs', 'name', '')
         tc.formvalue('userprefs', 'email', '')
         tc.submit()
         tc.find('Your preferences have been saved.')
开发者ID:pkdevbox,项目名称:trac,代码行数:25,代码来源:functional.py

示例7: runTest

 def runTest(self):
     binary_data = '\xcf\xd0\xe0\x11\xb1\xa1\xe1\x1a\x00\x00'
     self._tester.upload_csv_for_import(binary_data, file_encoding=None)
     tc.find('<h1>Import Preview</h1>')
     
     tc.find('<strong>Warning:</strong>')
     tc.notfind('businessvalue')
     tc.notfind(u'Umlaut check äöü'.encode('UTF-8'))
     tc.find("Import not available, errors detected.")
开发者ID:djangsters,项目名称:agilo,代码行数:9,代码来源:import_test.py

示例8: 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

示例9: runTest

 def runTest(self):
     """Test for regression of http://trac.edgewall.org/ticket/11777
     fix for raw revisions in search results.
     """
     self._testenv.svn_mkdir(["ticket11777"], "")
     rev = self._testenv.svn_add("ticket11777/file1.txt", "data", "ticket-11777")
     tc.go(self._tester.url + "/search?q=ticket-11777&noquickjump=1&changeset=on")
     tc.notfind(r"\[%010d\]: ticket-11777" % rev)
     tc.find(r"\[%d\]: ticket-11777" % rev)
     tc.find(' href="/changeset/%d"' % rev)
开发者ID:pkdevbox,项目名称:trac,代码行数:10,代码来源:functional.py

示例10: 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

示例11: runTest

 def runTest(self):
     self._tester.login_as(Usernames.product_owner)
     # create two tickets
     ticket_info = self._tester.perform_import(GOOD_CSV_DATA)
     csv_delete_data = self._tester.build_csv_for_ticket_deletion_from(ticket_info)
     
     encoding = self._tester.upload_csv_for_delete_import(csv_delete_data)
     tc.find('<h1>Delete Preview</h1>')
     tc.find('File contents read with encoding <b>%s</b>.' % encoding)
     tc.notfind('businessvalue')
     tc.notfind('keywords')
开发者ID:djangsters,项目名称:agilo,代码行数:11,代码来源:delete_by_import_test.py

示例12: runTest

    def runTest(self):
        self._tester.login_as(Usernames.team_member)
        ticket_id = self._tester.create_new_agilo_task('some task')
        self._tester.accept_ticket(ticket_id)
        
        self._tester.login_as(Usernames.second_team_member)
        self._tester.go_to_view_ticket_page(ticket_id, should_fail=True)
        tc.notfind("#properties")
        tc.find("In order to edit this ticket you need to be either")

        second_ticket_id = self._tester.create_new_agilo_task('my task')
        self._assert_no_brute_force_ticket_change(second_ticket_id, ticket_id)
开发者ID:djangsters,项目名称:agilo,代码行数:12,代码来源:ticket_permission_test.py

示例13: 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

示例14: runTest

 def runTest(self):
     """Test for regression of http://trac.edgewall.org/ticket/11777
     fix for raw revisions in search results.
     """
     self._testenv.svn_mkdir(['ticket11777'], '')
     rev = self._testenv.svn_add('ticket11777/file1.txt', 'data',
                                 'ticket-11777')
     tc.go(self._tester.url +
           '/search?q=ticket-11777&noquickjump=1&changeset=on')
     tc.notfind(r'\[%010d\]: ticket-11777' % rev)
     tc.find(r'\[%d\]: ticket-11777' % rev)
     tc.find(' href="/changeset/%d"' % rev)
开发者ID:exocad,项目名称:exotrac,代码行数:12,代码来源:functional.py


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