コード例 #1
0
def test_be(self):
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 2)
    driver.get(pol_data.DataBase_added_confs_zc[len(pol_data.DataBase_added_confs_zc)-6])
    driver.find_element_by_name("reject").click()
    try: self.assertEqual(driver.find_element_by_xpath(u"//span[@class='label label-danger']").text, u"Отклонена верификатором")
    except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #2
0
def test_bl(self):
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 3)
    driver.get(pol_data.DataBase_added_confs_zc[len(pol_data.DataBase_added_confs_zc)-5])
    driver.find_element_by_name("change").click() 
    try: self.assertEqual(driver.find_element_by_xpath(u"//span[@class='label label-warning']").text, u"Находится на верификации")
    except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #3
0
def test_ia(self):
    atm_error = False
    print "\nBlock 18:"
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 3)
    for ix in range(0, 3):
        fill_form_ia(self)
        pol_data.DataBase_added_grant_zc.append(driver.current_url)
コード例 #4
0
def test_fc(self):
	driver = self.driver
	pol_data.login_form_logout(self)
	pol_data.login_form_enter(self, 2)
	driver.get(pol_data.DataBase_added_editorials[0])
	driver.find_element_by_name("reject").click()
	try: self.assertEqual(u"Отклонено", \
			driver.find_element_by_xpath(u"//span[@class='label label-danger']").text)
	except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #5
0
def test_ia(self):
	atm_error = False
	print "\nBlock 18:"
	driver = self.driver
	pol_data.login_form_logout(self)
	pol_data.login_form_enter(self, 3)
	for ix in range(0, 3):
		fill_form_ia(self)
		pol_data.DataBase_added_grant_zc.append(driver.current_url)
コード例 #6
0
def test_a2(self):
    driver = self.driver
    t_c = False
    driver.get(self.base_url + "/auth/login/")
    pol_data.login_form_enter(self, 3)
    if driver.find_element_by_xpath("//li[@class='dropdown']/a[@class='dropdown-toggle']").text != "":
        t_c = True
    try: self.assertEqual(t_c, True)
    except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #7
0
def test_ib(self):
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 1)
    driver.get(pol_data.DataBase_added_grant_zc[0])
    driver.find_element_by_name("reject").click()
    try:        self.assertEqual(u"Отклонено", \
     driver.find_element_by_xpath(u"//span[@class='label label-danger']").text)
    except AssertionError as e:
        self.verificationErrors.append(str(e))
コード例 #8
0
def test_c2(self):
    driver = self.driver
    global gl_curr_url
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 2)
    driver.get(gl_curr_url)
    driver.find_element_by_name("reject").click()
    try: self.assertEqual(u"Отклонена", \
            driver.find_element_by_xpath(u"//span[@class='label label-danger']").text)
    except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #9
0
def test_c3(self):
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 3)
    fill_form_122(self, 1)    
    global gl_curr_url
    gl_curr_url = driver.current_url
    try: self.assertEqual(u"Находится на верификации", \
            driver.find_element_by_xpath(u"//span[@class='label label-warning']").text)
    except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #10
0
def test_c8(self):
    driver = self.driver
    global gl_curr_url
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 2)
    driver.get(gl_curr_url)
    driver.find_element_by_name("verify").click()
    try: self.assertEqual(u"Верифицирована", \
            driver.find_element_by_xpath(u"//span[@class='label label-success']").text)
    except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #11
0
def test_ai(self):
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 3)
    driver.get(
        pol_data.DataBase_added_confs[len(pol_data.DataBase_added_confs) - 1])
    driver.find_element_by_name("change").click()
    try:        self.assertEqual(u"Находится на верификации", \
           driver.find_element_by_xpath(u"//span[@class='label label-warning']").text)
    except AssertionError as e:
        self.verificationErrors.append(str(e))
コード例 #12
0
def test_ap(self):
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 2)
    driver.get(
        pol_data.DataBase_added_confs[len(pol_data.DataBase_added_confs) - 1])
    driver.find_element_by_name("verify").click()
    try:        self.assertEqual(u"Верифицирована", \
           driver.find_element_by_xpath(u"//span[@class='label label-success']").text)
    except AssertionError as e:
        self.verificationErrors.append(str(e))
コード例 #13
0
def test_kb(self):
	atm_error = False
	driver = self.driver
	pol_data.login_form_logout(self)
	pol_data.login_form_enter(self, 3)
	for ix in range(0, 1):
		fill_form_kb(self, ix)
		#if driver.find_element_by_xpath(u"//span[@class='label label-warning']").text != u"Находится на верификации":
		#    atm_error = True
		pol_data.DataBase_added_grant.append(driver.current_url)
	try: self.assertEqual(atm_error, False)
	except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #14
0
def test_fb(self):
	driver = self.driver
	pol_data.login_form_logout(self)
	pol_data.login_form_enter(self, 3)
	err_flag = False
	for itx in range(0, 2):
		driver.get(self.base_url + "/editboard/editboard/")
		fill_form_fa(self, itx)
		pol_data.DataBase_added_editorials.append(driver.current_url)
		if driver.find_element_by_xpath(u"//span[@class='label label-warning']").text != u"Находится на верификации":
			err_flag = True
	try: self.assertEqual(False, err_flag)
	except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #15
0
def test_ic(self):
    driver = self.driver
    print '\n'
    for i in pol_data.DataBase_added_grant_zc:
        print i, '\n'
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 1)
    driver.get(pol_data.DataBase_added_grant_zc[1])
    driver.find_element_by_name("create").click()
    driver.find_element_by_id("id_container_0").clear()
    driver.find_element_by_id("id_container_0").send_keys("con")
    driver.find_element_by_css_selector("span.hilight").click()
    driver.find_element_by_xpath(u"//input[@value=\"Выбрать\"]").click()
コード例 #16
0
def test_ic(self):
	driver = self.driver
	print '\n'
	for i in pol_data.DataBase_added_grant_zc:
		print i, '\n'
	pol_data.login_form_logout(self)
	pol_data.login_form_enter(self, 1)
	driver.get(pol_data.DataBase_added_grant_zc[1])
	driver.find_element_by_name("create").click()
	driver.find_element_by_id("id_container_0").clear()
	driver.find_element_by_id("id_container_0").send_keys("con")
	driver.find_element_by_css_selector("span.hilight").click()
	driver.find_element_by_xpath(u"//input[@value=\"Выбрать\"]").click()
コード例 #17
0
def test_kb(self):
    atm_error = False
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 3)
    for ix in range(0, 1):
        fill_form_kb(self, ix)
        #if driver.find_element_by_xpath(u"//span[@class='label label-warning']").text != u"Находится на верификации":
        #    atm_error = True
        pol_data.DataBase_added_grant.append(driver.current_url)
    try:
        self.assertEqual(atm_error, False)
    except AssertionError as e:
        self.verificationErrors.append(str(e))
コード例 #18
0
def test_ba(self):
    atm_error = False
    #print pol_data.DataBase_added_confs
    print "\nBlock 12:"
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 3)
    for ix in range(1, 5):
        fill_form_zcx(self, ix)
        if driver.find_element_by_xpath(u"//span[@class='label label-warning']").text != u"Находится на верификации":
            atm_error = True
        pol_data.DataBase_added_confs_zc.append(driver.current_url)
    try: self.assertEqual(atm_error, False)
    except AssertionError as e: self.verificationErrors.append(str(e))
コード例 #19
0
def test_be(self):
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 2)
    driver.get(
        pol_data.DataBase_added_confs_zc[len(pol_data.DataBase_added_confs_zc)
                                         - 6])
    driver.find_element_by_name("reject").click()
    try:
        self.assertEqual(
            driver.find_element_by_xpath(
                u"//span[@class='label label-danger']").text,
            u"Отклонена верификатором")
    except AssertionError as e:
        self.verificationErrors.append(str(e))
コード例 #20
0
def test_fb(self):
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 3)
    err_flag = False
    for itx in range(0, 2):
        driver.get(self.base_url + "/editboard/editboard/")
        fill_form_fa(self, itx)
        pol_data.DataBase_added_editorials.append(driver.current_url)
        if driver.find_element_by_xpath(u"//span[@class='label label-warning']"
                                        ).text != u"Находится на верификации":
            err_flag = True
    try:
        self.assertEqual(False, err_flag)
    except AssertionError as e:
        self.verificationErrors.append(str(e))
コード例 #21
0
def test_ba(self):
    atm_error = False
    #print pol_data.DataBase_added_confs
    print "\nBlock 12:"
    driver = self.driver
    pol_data.login_form_logout(self)
    pol_data.login_form_enter(self, 3)
    for ix in range(1, 5):
        fill_form_zcx(self, ix)
        if driver.find_element_by_xpath(u"//span[@class='label label-warning']"
                                        ).text != u"Находится на верификации":
            atm_error = True
        pol_data.DataBase_added_confs_zc.append(driver.current_url)
    try:
        self.assertEqual(atm_error, False)
    except AssertionError as e:
        self.verificationErrors.append(str(e))