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


Python test_db_util.get_private_role函数代码示例

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


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

示例1: test_0000_initiate_users

 def test_0000_initiate_users(self):
     """Create necessary user accounts and login as an admin user."""
     """
     We are at step 1.
     Create all the user accounts that are needed for this test script to run independently of other test.
     Previously created accounts will not be re-created.
     """
     self.logout()
     self.login(email=common.test_user_1_email, username=common.test_user_1_name)
     test_user_1 = test_db_util.get_user(common.test_user_1_email)
     assert test_user_1 is not None, (
         "Problem retrieving user with email %s from the database" % common.test_user_1_email
     )
     test_user_1_private_role = test_db_util.get_private_role(test_user_1)
     self.logout()
     self.login(email=common.test_user_2_email, username=common.test_user_2_name)
     test_user_2 = test_db_util.get_user(common.test_user_2_email)
     assert test_user_2 is not None, (
         "Problem retrieving user with email %s from the database" % common.test_user_2_email
     )
     test_user_2_private_role = test_db_util.get_private_role(test_user_2)
     self.logout()
     self.login(email=common.admin_email, username=common.admin_username)
     admin_user = test_db_util.get_user(common.admin_email)
     assert admin_user is not None, "Problem retrieving user with email %s from the database" % common.admin_email
     admin_user_private_role = test_db_util.get_private_role(admin_user)
开发者ID:knowingchaos,项目名称:galaxy,代码行数:26,代码来源:test_0400_repository_component_reviews.py

示例2: test_0000_initiate_users

 def test_0000_initiate_users( self ):
     """Create necessary user accounts and login as an admin user."""
     self.login( email=common.test_user_1_email, username=common.test_user_1_name )
     test_user_1 = test_db_util.get_user( common.test_user_1_email )
     assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % common.test_user_1_email
     test_user_1_private_role = test_db_util.get_private_role( test_user_1 )
     self.logout()
     self.login( email=common.admin_email, username=common.admin_username )
     admin_user = test_db_util.get_user( common.admin_email )
     assert admin_user is not None, 'Problem retrieving user with email %s from the database' % common.admin_email
     admin_user_private_role = test_db_util.get_private_role( admin_user )
开发者ID:cidvbi,项目名称:PathogenPortal,代码行数:11,代码来源:test_0000_basic_repository_features.py


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