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


Python KolabWAPTestHelpers.create_user方法代码示例

本文整理汇总了Python中helperKolabWAP.KolabWAPTestHelpers.create_user方法的典型用法代码示例。如果您正苦于以下问题:Python KolabWAPTestHelpers.create_user方法的具体用法?Python KolabWAPTestHelpers.create_user怎么用?Python KolabWAPTestHelpers.create_user使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在helperKolabWAP.KolabWAPTestHelpers的用法示例。


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

示例1: test_domain_admin_user_type

# 需要导入模块: from helperKolabWAP import KolabWAPTestHelpers [as 别名]
# 或者: from helperKolabWAP.KolabWAPTestHelpers import create_user [as 别名]
    def test_domain_admin_user_type(self):
        kolabWAPhelper = KolabWAPTestHelpers(self.driver)
        self.kolabWAPhelper = kolabWAPhelper
        
        # login Directory Manager
        kolabWAPhelper.login_kolab_wap("http://localhost/kolab-webadmin", "cn=Directory Manager", "test")

        kolabWAPhelper.select_domain("administrators.org")

        username, emailLogin, password = kolabWAPhelper.create_user(
            prefix = "admin")

        # now edit the user
        elem = self.driver.find_element_by_id("searchinput")
        elem.send_keys(username)
        elem.send_keys(Keys.RETURN)
        time.sleep(0.5)

        elem = self.driver.find_element_by_xpath("//tbody/tr/td[@class=\"name\"]")
        self.assertEquals(username + ", " + username, elem.text, "Expected to select user " + username + " but was " + elem.text)
        elem.click()
        time.sleep(0.5)
        
        # check if the user type is actually a domain admin
        elem = self.driver.find_element_by_xpath("//form[@id='user-form']/fieldset/table/tbody/tr/td[@class='value']")
        self.assertEquals("Domain Administrator", elem.text, "user type should be Domain Administrator, but was " + elem.text)

        kolabWAPhelper.logout_kolab_wap()
开发者ID:dhoffend,项目名称:kolab3_tbits_scripts,代码行数:30,代码来源:testDomainAdmin.py

示例2: test_edit_user_himself

# 需要导入模块: from helperKolabWAP import KolabWAPTestHelpers [as 别名]
# 或者: from helperKolabWAP.KolabWAPTestHelpers import create_user [as 别名]
    def test_edit_user_himself(self):
        kolabWAPhelper = KolabWAPTestHelpers(self.driver)
        self.kolabWAPhelper = kolabWAPhelper
        
        # login Directory Manager
        kolabWAPhelper.login_kolab_wap("http://localhost/kolab-webadmin", "cn=Directory Manager", "test")

        username, emailLogin, password = kolabWAPhelper.create_user()

        kolabWAPhelper.logout_kolab_wap()

        # login the new user
        kolabWAPhelper.login_kolab_wap("http://localhost/kolab-webadmin", emailLogin, password)

        self.helper_user_edits_himself()
开发者ID:dhoffend,项目名称:kolab3_tbits_scripts,代码行数:17,代码来源:testCreateUserAndEditSelf.py

示例3: test_domain_admin

# 需要导入模块: from helperKolabWAP import KolabWAPTestHelpers [as 别名]
# 或者: from helperKolabWAP.KolabWAPTestHelpers import create_user [as 别名]
    def test_domain_admin(self):
        kolabWAPhelper = KolabWAPTestHelpers(self.driver)
        self.kolabWAPhelper = kolabWAPhelper
        
        # login Directory Manager
        kolabWAPhelper.login_kolab_wap("http://localhost/kolab-webadmin", "cn=Directory Manager", "test")

        kolabWAPhelper.select_domain("administrators.org")

        username, emailLogin, password = kolabWAPhelper.create_user(
            prefix = "admin",
            overall_quota = "1gb",
            default_quota = "100mb",
            max_accounts = 3,
            allow_groupware = True)

        # TODO create domain, with domain admin
        # TODO select domain
        # TODO create user accounts
        
        kolabWAPhelper.logout_kolab_wap()
开发者ID:dhoffend,项目名称:kolab3_tbits_scripts,代码行数:23,代码来源:testDomainAdmin.py

示例4: test_modified_foldername_in_new_domain

# 需要导入模块: from helperKolabWAP import KolabWAPTestHelpers [as 别名]
# 或者: from helperKolabWAP.KolabWAPTestHelpers import create_user [as 别名]
    def test_modified_foldername_in_new_domain(self):
        kolabWAPhelper = KolabWAPTestHelpers(self.driver)
        self.kolabWAPhelper = kolabWAPhelper
        
        # login
        kolabWAPhelper.login_kolab_wap("http://localhost/kolab-webadmin", "cn=Directory Manager", "test")

        domainname = kolabWAPhelper.create_domain()

        #modify the default folders in /etc/kolab/kolab.conf
        newContactsFolderName = self.helper_modify_autocreate_folders()

        username, emailLogin, password = kolabWAPhelper.create_user()

        kolabWAPhelper.logout_kolab_wap()

        # check if mailbox has been created, with the modified folder name
        p = subprocess.Popen("kolab lm | grep " + username + " | grep " + newContactsFolderName, shell=True, stdout=subprocess.PIPE)
        out, err = p.communicate()
        if newContactsFolderName not in out:
            self.assertTrue(False, "kolab lm cannot find mailbox with folder " + newContactsFolderName + " for new user " + username)
开发者ID:dhoffend,项目名称:kolab3_tbits_scripts,代码行数:23,代码来源:testAutoCreateFolders.py


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