コード例 #1
0
 def test_duplicate_user_disallowed(self, mozwebqa):
     """
     Returns Pass if creating a existing user fails.
     """
     home_page = Home(mozwebqa)
     sysapi = ApiTasks(mozwebqa)
     
     new_user_name = "dupuser%s" % home_page.random_string()
     password = "******" % home_page.random_string()
     email_addr = new_user_name + "@example.com"
     sysapi.create_user(new_user_name, password, email_addr)
     
     home_page.login()
     home_page.tabs.click_tab("administration_tab")
     
     administration = AdministrationTab(mozwebqa)
     administration.create_new_user(new_user_name, password, password, email_addr)
     
     Assert.true(home_page.is_failed)
コード例 #2
0
 def test_create_new_user(self, mozwebqa):
     '''
     Test to create a new User, no org, no environment.
     '''
     home_page = Home(mozwebqa)
     home_page.login()
     
     home_page.tabs.click_tab("administration_tab")
     
     administration = AdministrationTab(mozwebqa)
     new_user_name = home_page.random_string()
     new_user_name = "newuser-%s" % home_page.random_string()
     
     password = "******" % home_page.random_string()
     
     email_addr = new_user_name + "@example.com"
     administration.create_new_user(new_user_name, password, password, email_addr)
     
     Assert.true(home_page.is_successful)
     Assert.true(administration.user(new_user_name).is_displayed)