Best Python code snippet using tempest_python
tags_grouping.py
Source:tags_grouping.py
...263 def test_contacts_quxinli_0372(self):264 """è系人éæ©å¨é¡µé¢"""265 glp = GroupListPage()266 time.sleep(1)267 glp.delete_group(name='aaa')268 glp.new_group()269 glp.click_text('aaa')270 time.sleep(1)271 glp.click_text('æ·»å æå')272 time.sleep(2)273 glp.page_should_contain_text('æç´¢æè¾å
¥å·ç ')274 glp.page_should_contain_text('éæ©è系人')275 glp.page_should_contain_text('ç¡®å®')276 glp.click_back_button(times=2)277 glp.delete_group(name='aaa')278 @tags('ALL', 'SMOKE', 'CMCC')279 def test_contacts_quxinli_0390(self):280 """群åä¿¡æ¯"""281 glp = GroupListPage()282 time.sleep(1)283 glp.delete_group(name='aaa')284 glp.new_group(name='aaa')285 # æ·»å å°ç»æå286 glp.click_text('aaa')287 time.sleep(1)288 LabelGroupingChatPage().click_text('æ·»å æå')289 slcp = SelectLocalContactsPage()290 time.sleep(2)291 slcp.swipe_select_one_member_by_name('大佬1')292 slcp.click_sure()293 time.sleep(2)294 # åéé¿ææ¬æ¶æ¯295 message = str('aa aa' * 20)296 glp.send_message_to_group([message])297 time.sleep(5)298 glp.page_contain_element('已转çä¿¡éè¾¾')299 # åé纯ææ¬300 glp.click_back_by_android(2)301 time.sleep(1)302 message = 'aaaa'303 glp.send_message_to_group(message)304 time.sleep(5)305 glp.page_contain_element('已转çä¿¡éè¾¾')306 # åéææ¬ ç©ºæ ¼307 glp.click_back_by_android(2)308 time.sleep(1)309 message = 'aa aa'310 glp.send_message_to_group(message)311 time.sleep(5)312 glp.page_contain_element('已转çä¿¡éè¾¾')313 # åé表æ
314 glp.click_back_by_android(2)315 time.sleep(1)316 glp.send_express_to_group()317 time.sleep(1)318 glp.page_not_contain_element('åé失败')319 # åéå¾ç320 glp.click_back_by_android()321 time.sleep(1)322 glp.send_picture_to_group()323 time.sleep(1)324 glp.page_not_contain_element('åé失败')325 time.sleep(1)326 glp = GroupListPage()327 glp.click_back_by_android(times=2)328 glp.delete_group(name='aaa')329 @tags('ALL', 'SMOKE', 'CMCC')330 def test_contacts_quxinli_0397(self):331 """å¤æ¹çµè¯"""332 glp = GroupListPage()333 cdp = ContactDetailsPage()334 time.sleep(2)335 glp.delete_group(name='aaa')336 glp.new_group(name='aaa')337 # è¿å
¥ç¾¤ç»,æ·»å è系人338 glp.click_text('aaa')339 time.sleep(1)340 glp.tap_sure_box()341 time.sleep(1)342 glp.click_text('æ·»å æå')343 time.sleep(2)344 slcp = SelectLocalContactsPage()345 slcp.swipe_select_one_member_by_name('大佬1')346 slcp.swipe_select_one_member_by_name('大佬3')347 slcp.click_sure()348 time.sleep(2)349 # å¤æ¹éè¯350 glp.enter_mutil_call()351 time.sleep(1)352 glp.click_text("大佬1")353 time.sleep(1)354 cdp.send_call_number()355 time.sleep(1)356 if glp.is_text_present('æç¥éäº'):357 time.sleep(2)358 glp.click_text('æç¥éäº')359 if glp.is_text_present('åèµ·å¤æ¹çµè¯å¤±è´¥'):360 pass361 else:362 cdp.cancel_permission()363 time.sleep(2)364 cdp.cancel_hefeixin_call()365 time.sleep(2)366 @tags('ALL', 'SMOKE', 'CMCC')367 def test_contacts_quxinli_0398(self):368 """å¤æ¹è§é¢"""369 GroupPage = GroupListPage()370 cdp = ContactDetailsPage()371 # preconditions.launch_app()372 time.sleep(2)373 GroupPage.delete_group(name='aaa')374 GroupPage.new_group(name='aaa')375 # æ·»å æå376 GroupPage.click_text('aaa')377 GroupPage.tap_sure_box()378 LabelGroupingChatPage().click_text('æ·»å æå')379 slcp = SelectLocalContactsPage()380 time.sleep(1)381 slcp.swipe_select_one_member_by_name('大佬1')382 time.sleep(1)383 slcp.click_sure()384 time.sleep(1)385 # ç¹å»å¤æ¹è§é¢386 GroupPage.enter_mutil_video_call()387 while GroupPage.is_text_present('å§ç»å
许'):388 GroupPage.click_text('å§ç»å
许')389 # if GroupPage.is_text_present('ç¸æºæé'):390 # GroupPage.click_text('å§ç»å
许')391 time.sleep(1)392 GroupPage.click_text("大佬1")393 time.sleep(2)394 cdp.send_call_number()395 if cdp.is_text_present('æä¸å¼å¯'):396 cdp.cancel_permission()397 cdp.end_video_call()398 GroupPage = GroupListPage()399 time.sleep(1)400 SelectOneGroupPage().click_back_by_android()401 time.sleep(1)402 GroupPage.delete_group(name='aaa')403 @tags('ALL', 'SMOKE', 'CMCC')404 def test_contacts_quxinli_0403(self):405 """ä¿®æ¹æ ç¾å称"""406 GroupPage = GroupListPage()407 time.sleep(1)408 GroupPage.delete_group(name='aaa')409 GroupPage.new_group(name='aaa')410 GroupPage.click_text('aaa')411 GroupPage.tap_sure_box()412 GroupPage.click_settings_button()413 GroupPage.update_label_name(name='bbb')414 GroupPage.click_back_button(times=2)415 GroupPage.page_should_contain_text(text='bbb')416 GroupPage = GroupListPage()417 # GroupPage.click_back_button(times=2)418 GroupPage.delete_group(name='aaa')419 @tags('ALL', 'SMOKE', 'CMCC')420 def test_contacts_quxinli_0411(self):421 """移é¤æå"""422 GroupPage = GroupListPage()423 # cdp = ContactDetailsPage()424 time.sleep(1)425 GroupPage.delete_group(name='aaa')426 GroupPage.new_group(name='aaa')427 # æ·»å è系人428 time.sleep(2)429 GroupPage.click_text('aaa')430 time.sleep(1)431 LabelGroupingChatPage().click_text('æ·»å æå')432 slcp = SelectLocalContactsPage()433 slcp.swipe_select_one_member_by_name('大佬3')434 time.sleep(1)435 slcp.swipe_select_one_member_by_name('大佬4')436 slcp.click_sure()437 time.sleep(2)438 #移é¤æå439 GroupPage.click_settings_button()440 GroupPage.click_move_label()441 GroupPage.click_text('大佬3')442 time.sleep(1)443 GroupPage.click_sure_element()444 time.sleep(1)445 GroupPage.click_move_label()446 time.sleep(1)447 GroupPage.page_should_not_contain_text("大佬3")448 GroupPage = GroupListPage()449 GroupPage.click_back_button(times=3)450 GroupPage.delete_group(name='aaa')451 @tags('ALL', 'SMOKE', 'CMCC')452 def test_contacts_quxinli_0415(self):453 """å é¤æ ç¾"""454 GroupPage = GroupListPage()455 time.sleep(1)456 LabelGroupingPage().delete_all_label()457 time.sleep(2)458 GroupPage.new_group(name='ccc')459 GroupPage.delete_group(name='ccc')460 GroupPage.click_back_by_android(times=2)461 GroupPage.page_should_not_contain_text('ccc')462class Tag_Group(TestCase):463 """èç³» - æ ç¾ãæ°å»ºåç»"""464 @classmethod465 def setUpClass(cls):466 Preconditions.select_mobile('Android-移å¨')467 current_mobile().hide_keyboard_if_display()468 Preconditions.make_already_in_message_page()469 mess = MessagePage()470 if mess.is_on_this_page():471 WorkbenchPreconditions.enter_create_team_page2()472 # å½å为æ¶æ¯é¡µé¢473 # ç¡®ä¿åå¨åé¨é¨474 WorkbenchPreconditions.create_sub_department()475 # 导å
¥æµè¯è系人476 fail_time1 = 0477 flag1 = False478 import dataproviders479 while fail_time1 < 2:480 try:481 required_contacts = dataproviders.get_preset_contacts()482 conts = ContactsPage()483 conts.open_contacts_page()484 if conts.is_text_present("åç°SIMå¡è系人"):485 conts.click_text("æ¾ç¤º")486 for name, number in required_contacts:487 # å建è系人488 conts.create_contacts_if_not_exits_new(name, number)489 flag1 = True490 except:491 fail_time1 += 1492 if flag1:493 break494 def default_setUp(self):495 Preconditions.select_mobile('Android-移å¨')496 Preconditions.enter_label_grouping_chat_page()497 @tags('ALL', 'SMOKE', 'CMCC')498 def test_contacts_quxinli_0352(self):499 """æªæ·»å åç»"""500 lg = LabelGroupingPage()501 lg.wait_for_page_load()502 lg.delete_all_label()503 lg.assert_default_status_is_right()504 lg.wait_for_page_load()505 lg.click_back_by_android(2)506 conts_page = ContactsPage()507 conts_page.open_message_page()508 @tags('ALL', 'CONTACT', 'CMCC')509 def test_contacts_quxinli_0353(self):510 """æ°å»ºåç»"""511 glp = GroupListPage()512 glp.click_new_group()513 time.sleep(1)514 glp.check_if_contains_element('ä¸ºä½ çåç»å建ä¸ä¸ªå称')515 glp.check_if_contains_element('请è¾å
¥æ ç¾åç»å称')516 glp.check_if_contains_element('æ é¢æ°å»ºåç»')517 glp.check_if_contains_element()518 @tags('ALL', 'CONTACT', 'CMCC')519 def test_contacts_quxinli_0354(self):520 """æ°å»ºåç»,æ ç¾åç»å称为空"""521 GroupPage=GroupListPage()522 GroupPage.click_new_group()523 GroupPage.click_sure_element()524 time.sleep(3)525 GroupPage.check_if_contains_element()526 GroupPage.sure_icon_is_checkable()527 @tags('ALL', 'CONTACT', 'CMCC')528 def test_contacts_quxinli_0355(self):529 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥ç©ºæ ¼"""530 GroupPage = GroupListPage()531 GroupPage.click_new_group()532 GroupPage.click_input_element()533 time.sleep(3)534 GroupPage.input_content(text=' ')535 time.sleep(2)536 GroupPage.check_if_contains_element()537 GroupPage.sure_icon_is_checkable()538 @tags('ALL', 'CONTACT', 'CMCC')539 def test_contacts_quxinli_0356(self):540 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥9个æ±å"""541 GroupPage = GroupListPage()542 GroupPage.delete_group(name='ç¥ä¸è·¯é¡ºé£å¹¸ç¦ç¾æ»¡')543 GroupPage.click_new_group()544 GroupPage.click_input_element()545 time.sleep(1)546 GroupPage.input_content(text='ç¥ä¸è·¯é¡ºé£å¹¸ç¦ç¾æ»¡')547 GroupPage.click_sure_element()548 time.sleep(2)549 GroupPage.click_allow_button()550 GroupPage.page_should_contain_text('éæ©è系人')551 def tearDown_test_contacts_quxinli_0356(self):552 Preconditions.enter_label_grouping_chat_page()553 GroupPage = GroupListPage()554 GroupPage.delete_group(name='ç¥ä¸è·¯é¡ºé£å¹¸ç¦ç¾æ»¡')555 @tags('ALL', 'CONTACT', 'CMCC')556 def test_contacts_quxinli_0357(self):557 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥10个æ±å"""558 GroupPage = GroupListPage()559 GroupPage.click_new_group()560 GroupPage.click_input_element()561 time.sleep(3)562 GroupPage.input_content(text="ç¥ä¸è·¯é¡ºé£å幸ç¦ç¾æ»¡")563 GroupPage.click_sure_element()564 GroupPage.click_allow_button()565 GroupPage.page_should_contain_text('éæ©è系人')566 def tearDown_test_contacts_quxinli_0357(self):567 GroupPage = GroupListPage()568 GroupPage.click_back_button(times=2)569 GroupPage.delete_group(name='ç¥ä¸è·¯é¡ºé£å幸ç¦ç¾æ»¡')570 @tags('ALL', 'CONTACT', 'CMCC')571 def test_contacts_quxinli_0358(self):572 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥11个æ±å"""573 GroupPage = GroupListPage()574 GroupPage.click_new_group()575 GroupPage.click_input_element()576 time.sleep(3)577 text="ç¥ä¸è·¯é¡ºé£å幸ç¦ç¾æ»¡å"578 GroupPage.input_content(text)579 time.sleep(1)580 name=GroupPage.get_text_of_lablegrouping_name()581 self.assertNotEqual(text,name)582 self.assertTrue(len(name) == 10)583 #å é¤æ ç¾åç»584 time.sleep(1)585 LabelGroupingPage().click_back()586 @tags('ALL', 'CONTACT', 'CMCC')587 def test_contacts_quxinli_0359(self):588 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥29个æ°å"""589 GroupPage = GroupListPage()590 time.sleep(1)591 GroupPage.click_new_group()592 GroupPage.click_input_element()593 time.sleep(1)594 self.message='1'*29595 GroupPage.input_content(text=self.message)596 time.sleep(1)597 GroupPage.click_sure_element()598 GroupPage.click_allow_button()599 time.sleep(1)600 GroupPage.page_should_contain_text('éæ©è系人')601 GroupPage.click_back_button(times=2)602 def tearDown_test_contacts_quxinli_0359(self):603 GroupPage = GroupListPage()604 time.sleep(1)605 GroupPage.delete_group(name=self.message)606 @tags('ALL', 'CONTACT', 'CMCC')607 def test_contacts_quxinli_0369(self):608 """æ°å»ºåç»,已添å åç»åæ ç¾åç»å表å±ç¤º"""609 GroupPage = GroupListPage()610 time.sleep(1)611 lg = LabelGroupingPage()612 lg.wait_for_page_load()613 lg.delete_all_label()614 GroupPage.new_group(name='aaa')615 GroupPage.new_group(name='bbb')616 y0=GroupPage.get_element_text_y()617 y1=GroupPage.get_element_text_y(text='aaa')618 y2=GroupPage.get_element_text_y(text='bbb')619 self.assertTrue(y0<y1<y2)620 def tearDown_test_contacts_quxinli_0369(self):621 GroupPage = GroupListPage()622 time.sleep(2)623 GroupPage.delete_group(name='aaa')624 time.sleep(1)625 GroupPage.delete_group(name='bbb')626 @tags('ALL', 'CONTACT', 'CMCC')627 def test_contacts_quxinli_0370(self):628 """ç¹å»åç»å表æ æåçåç»"""629 GroupPage = GroupListPage()630 time.sleep(1)631 lg = LabelGroupingPage()632 lg.wait_for_page_load()633 lg.delete_all_label()634 GroupPage.new_group()635 #ç¹å»è¯¥åç»636 GroupPage.click_text('aaa')637 time.sleep(2)638 GroupPage.page_should_contain_text('æç¥éäº')639 GroupPage.page_should_contain_text('æ·»å æå')640 #ç¹å»æç¥éäº641 GroupPage.click_text('æç¥éäº')642 GroupPage.page_should_not_contain_text('æç¥éäº')643 #ç¹å»æ·»å æå644 GroupPage.click_back_button()645 time.sleep(2)646 GroupPage.click_text('aaa')647 time.sleep(1)648 GroupPage.click_text('æ·»å æå')649 time.sleep(2)650 GroupPage.page_should_contain_text('éæ©è系人')651 def tearDown_test_contacts_quxinli_0370(self):652 GroupPage = GroupListPage()653 GroupPage.click_back_button(times=2)654 GroupPage.delete_group(name='aaa')655 @tags('ALL', 'CONTACT', 'CMCC')656 def test_contacts_quxinli_0371(self):657 """æ°å»ºåç»,åç»è¯¦æ
æä½çé¢"""658 GroupPage = GroupListPage()659 time.sleep(1)660 GroupPage.delete_group(name='aaa')661 GroupPage.new_group()662 time.sleep(1)663 GroupPage.click_text('aaa')664 time.sleep(2)665 GroupPage.click_text('ç¥éäº')666 time.sleep(1)667 GroupPage.page_contain_element()668 GroupPage.page_contain_element('群åä¿¡æ¯')669 GroupPage.page_contain_element('å¤æ¹çµè¯')670 GroupPage.page_contain_element('å¤æ¹è§é¢')671 GroupPage.page_contain_element('设置')672 GroupPage.page_contain_element('aaa')673 def tearDown_test_contacts_quxinli_0371(self):674 GroupPage = GroupListPage()675 GroupPage.click_back_button()676 GroupPage.delete_group(name='aaa')677 @tags('ALL', 'CONTACT', 'CMCC')678 def test_contacts_quxinli_0372(self):679 """æ°å»ºåç»,æ ç¾åç»æ·»å æå页é¢"""680 glp = GroupListPage()681 time.sleep(1)682 glp.delete_group(name='aaa')683 glp.new_group()684 glp.click_text('aaa')685 time.sleep(1)686 glp.click_text('æ·»å æå')687 time.sleep(2)688 glp.page_should_contain_text('æç´¢æè¾å
¥å·ç ')689 glp.page_should_contain_text('éæ©è系人')690 glp.page_should_contain_text('ç¡®å®')691 SelectContactsPage().sure_icon_is_checkable()692 glp.check_if_contains_element(text='è系人å表')693 def tearDown_test_contacts_quxinli_0372(self):694 glp = GroupListPage()695 glp.click_back_by_android()696 glp.delete_group(name='aaa')697 @tags('ALL', 'CONTACT', 'CMCC')698 def test_contacts_quxinli_0373(self):699 """æ ç¾åç»æ·»å æå-æç´¢ç»æ页é¢"""700 GroupPage = GroupListPage()701 time.sleep(1)702 GroupPage.delete_group(name='aaa')703 GroupPage.new_group(name='aaa')704 GroupPage.click_text('aaa')705 time.sleep(1)706 GroupPage.click_text('æ·»å æå')707 time.sleep(1)708 GroupPage.click_search_box()709 time.sleep(1)710 GroupPage.input_search_text(text='æµè¯')711 GroupPage.hide_keyboard()712 time.sleep(1)713 GroupPage.page_contain_element(locator='æç´¢æ¡-æç´¢ç»æ')714 #å é¤æç´¢ææ¬715 GroupPage.page_should_contain_element1(locator="å é¤-æç´¢")716 GroupPage.clear_input_box()717 time.sleep(1)718 GroupPage.is_element_present()719 #å次è¾å
¥å
容æç´¢720 GroupPage.input_search_text(text='æµè¯')721 GroupPage.hide_keyboard()722 time.sleep(1)723 GroupPage.page_contain_element(locator='æç´¢æ¡-æç´¢ç»æ')724 GroupPage.click_text('æµè¯å·ç 1')725 time.sleep(2)726 GroupPage.hide_keyboard()727 #跳转æå728 GroupPage.page_should_contain_text('æç´¢æè¾å
¥å·ç ')729 GroupPage.page_should_contain_text('éæ©è系人')730 #ç¹å»æç´¢ç»æ731 SelectLocalContactsPage().swipe_select_one_member_by_name('æµè¯å·ç 1')732 GroupPage.is_element_present(locator='å·²éæ©çè系人')733 def tearDown_test_contacts_quxinli_0373(self):734 GroupPage = GroupListPage()735 GroupPage.click_back_button(times=2)736 GroupPage.delete_group(name='aaa')737 @tags('ALL', 'CONTACT', 'CMCC')738 def test_contacts_quxinli_0374(self):739 """æ ç¾åç»æ·»å æå-æç´¢éçå·ç """740 glp = GroupListPage()741 time.sleep(1)742 glp.delete_group(name='aaa')743 glp.new_group(name='aaa')744 glp.click_text('aaa')745 time.sleep(1)746 glp.click_text('æ·»å æå')747 time.sleep(1)748 glp.click_search_box()749 time.sleep(1)750 glp.input_search_text(text='13800138005')751 glp.hide_keyboard()752 time.sleep(1)753 glp.page_should_contain_text('éæ©è系人')754 glp.is_element_present(locator='è系人头å')755 def tearDown_test_contacts_quxinli_0374(self):756 glp = GroupListPage()757 glp.click_back_by_android(2)758 glp.delete_group(name='aaa')759 @tags('ALL', 'CONTACT', 'CMCC')760 def test_contacts_quxinli_0375(self):761 """æ ç¾åç»æ·»å æå-éæ©æ¬å°è系人"""762 GroupPage = GroupListPage()763 time.sleep(1)764 GroupPage.delete_group(name='aaa')765 GroupPage.new_group(name='aaa')766 GroupPage.click_text('aaa')767 time.sleep(1)768 LabelGroupingChatPage().click_text('æ·»å æå')769 slcp = SelectLocalContactsPage()770 slcp.swipe_select_one_member_by_name('大佬1')771 GroupPage.is_element_present(locator='å·²éæ©çè系人')772 GroupPage.sure_icon_is_checkable()773 #å次ç¹å»å·²éæ©çè系人774 slcp.swipe_select_one_member_by_name('大佬1')775 GroupPage.is_element_present(locator='å·²éæ©çè系人')776 #ç¹å»å·²éæ©è系人ç头å,åæ¶éæ©777 slcp.swipe_select_one_member_by_name('大佬1')778 GroupPage.click_selected_contacts()779 GroupPage.is_element_present(locator='å·²éæ©çè系人')780 #éæ©äººå,æ·»å æåæå781 slcp.swipe_select_one_member_by_name('大佬1')782 slcp.click_sure()783 time.sleep(1)784 def tearDown_test_contacts_quxinli_0375(self):785 GroupPage = GroupListPage()786 GroupPage.click_back_button()787 GroupPage.delete_group(name='aaa')788 @staticmethod789 def setUp_test_contacts_quxinli_0376():790 Preconditions.select_mobile('Android-移å¨')791 current_mobile().hide_keyboard_if_display()792 Preconditions.init_and_enter_contacts_page()793 if ContactsPage().is_text_present('éè¦ä½¿ç¨é讯å½æé'):794 ContactsPage().click_always_allowed()795 time.sleep(2)796 ContactsPage().click_search_box()797 time.sleep(2)798 ContactListSearchPage().input_search_keyword('æ¬æº')799 time.sleep(1)800 if ContactListSearchPage().is_contact_in_list('æ¬æº'):801 ContactListSearchPage().click_back_by_android()802 else:803 # å建è系人 æ¬æº804 ContactListSearchPage().click_back_by_android()805 # è¿å
¥ææºè系人页é¢806 ContactsPage().click_mobile_contacts()807 ContactsPage().click_add()808 creat_contact2 = CreateContactPage()809 creat_contact2.click_input_name()810 creat_contact2.input_name('æ¬æº')811 creat_contact2.click_input_number()812 phone_number = current_mobile().get_cards(CardType.CHINA_MOBILE)813 creat_contact2.input_number(phone_number[0])814 creat_contact2.save_contact()815 time.sleep(1)816 ContactDetailsPage().click_back_by_android(2)817 Preconditions.enter_label_grouping_chat_page()818 @tags('ALL', 'CONTACT', 'CMCC')819 def test_contacts_quxinli_0376(self):820 """æ ç¾åç»æ·»å æå-éæ©æ¬å°è系人ä¸å¯éæå"""821 glp = GroupListPage()822 glp.delete_group(name='aaa')823 glp.new_group(name='aaa')824 glp.click_text('aaa')825 time.sleep(1)826 LabelGroupingChatPage().click_text('æ·»å æå')827 slcp = SelectLocalContactsPage()828 slcp.swipe_select_one_member_by_name('æ¬æº')829 slcp.page_should_contain_text('该è系人ä¸å¯éæ©')830 def tearDown_test_contacts_quxinli_0376(self):831 glp = GroupListPage()832 glp.click_back_by_android()833 glp.delete_group(name='aaa')834 @tags('ALL', 'CONTACT', 'CMCC')835 def test_contacts_quxinli_0388(self):836 """åç»è¯¦æ
æä½çé¢-åç»åªæä¸ä¸ªäººåç¹å»ç¾¤åæ¶æ¯"""837 glp = GroupListPage()838 glp.delete_group(name='aaa')839 glp.new_group(name='aaa')840 glp.click_text('aaa')841 time.sleep(1)842 glp.click_text('æ·»å æå')843 time.sleep(1)844 slcp = SelectLocalContactsPage()845 slcp.swipe_select_one_member_by_name('大佬1')846 slcp.click_sure()847 time.sleep(2)848 glp.send_message_to_group()849 time.sleep(1)850 SingleChatPage().is_on_this_page()851 glp.page_should_contain_text('大佬1')852 def tearDown_test_contacts_quxinli_0388(self):853 glp = GroupListPage()854 glp.click_back_by_android(2)855 glp.delete_group(name='aaa')856 @tags('ALL', 'CONTACT', 'CMCC')857 def test_contacts_quxinli_0389(self):858 """åç»è¯¦æ
æä½çé¢-åç»æå¤ä¸ªäººåç¹å»ç¾¤åæ¶æ¯"""859 glp = GroupListPage()860 glp.delete_group(name='aaa')861 glp.new_group(name='aaa')862 # æ·»å è系人大佬1 大佬2863 time.sleep(2)864 glp.click_text('aaa')865 time.sleep(1)866 glp.click_text('æ·»å æå')867 slcp = SelectLocalContactsPage()868 slcp.swipe_select_one_member_by_name('大佬1')869 time.sleep(1)870 slcp.swipe_select_one_member_by_name('大佬2')871 slcp.click_sure()872 time.sleep(2)873 # éªè¯é¡µé¢å
ç´ 874 glp.send_message_to_group()875 time.sleep(1)876 glp.page_contain_element(locator='å¤æ¹éè¯_å¾æ ')877 glp.page_contain_element(locator='åç»è系人')878 glp.page_contain_element(locator='å¯åªä½é¢æ¿')879 glp.page_contain_element(locator='aaa')880 def tearDown_test_contacts_quxinli_0389(self):881 glp = GroupListPage()882 glp.click_back_by_android(2)883 glp.delete_group(name='aaa')884 @tags('ALL', 'CONTACT', 'CMCC')885 def test_contacts_quxinli_0390(self):886 """åç»è¯¦æ
æä½çé¢-群åæ¶æ¯-åéæ¶æ¯"""887 glp = GroupListPage()888 glp.delete_group(name='aaa')889 glp.new_group(name='aaa')890 # æ·»å å°ç»æå891 glp.click_text('aaa')892 time.sleep(1)893 glp.click_text('æ·»å æå')894 slcp = SelectLocalContactsPage()895 time.sleep(2)896 slcp.swipe_select_one_member_by_name('大佬1')897 slcp.click_sure()898 time.sleep(2)899 message = str('aa aa'*20)900 glp.send_message_to_group([message])901 time.sleep(1)902 glp.page_contain_element('已转çä¿¡éè¾¾')903 # åé纯ææ¬904 glp.click_back_by_android(2)905 time.sleep(1)906 message = 'aaaa'907 glp.send_message_to_group(message)908 time.sleep(5)909 glp.page_contain_element('已转çä¿¡éè¾¾')910 # åéææ¬ ç©ºæ ¼911 glp.click_back_by_android(2)912 time.sleep(1)913 message = 'aa aa'914 glp.send_message_to_group(message)915 time.sleep(5)916 glp.page_contain_element('已转çä¿¡éè¾¾')917 # åé表æ
918 glp.click_back_by_android(2)919 time.sleep(1)920 glp.send_express_to_group()921 time.sleep(1)922 glp.page_not_contain_element('åé失败')923 # åéå¾ç924 glp.click_back_by_android()925 time.sleep(1)926 glp.send_picture_to_group()927 time.sleep(2)928 glp.page_not_contain_element('åé失败')929 time.sleep(1)930 def tearDown_test_contacts_quxinli_0390(self):931 glp = GroupListPage()932 glp.click_back_by_android(2)933 glp.delete_group(name='aaa')934 @tags('ALL', 'CONTACT', 'CMCC')935 def test_contacts_quxinli_0394(self):936 """åç»è系人è¿å
¥Profile页-ææ """937 glp = GroupListPage()938 glp.delete_group(name='aaa')939 glp.new_group(name='aaa')940 # æ·»å æå941 glp.click_text('aaa')942 time.sleep(1)943 glp.click_text('æ·»å æå')944 time.sleep(1)945 slcp = SelectLocalContactsPage()946 slcp.swipe_select_one_member_by_name('大佬1')947 slcp.swipe_select_one_member_by_name('大佬2')948 time.sleep(1)949 slcp.click_sure()950 time.sleep(1)951 # è¿å
¥ç¾¤å页é¢952 glp.enter_group_message()953 glp.click_divide_group_icon()954 glp.page_contain_element(locator='åç»è系人_æ é¢')955 glp.click_text("大佬1")956 time.sleep(1)957 glp.click_star_icon()958 if glp.is_toast_exist('å·²æåæ·»å 为ææ è系人'):959 time.sleep(1)960 else:961 time.sleep(1)962 glp.click_star_icon()963 glp.is_toast_exist("å·²æåæ·»å 为ææ è系人")964 time.sleep(1)965 glp.click_star_icon()966 glp.is_toast_exist("å·²åæ¶æ·»å 为ææ è系人")967 # å次ç¹å»ææ 968 glp.click_star_icon()969 time.sleep(1)970 glp.click_back_by_android(5)971 glp.page_contain_star('大佬1')972 def tearDown_test_contacts_quxinli_0394(self):973 try:974 # å»é¤'大佬1'çææ 975 ContactsPage().select_contacts_by_name('大佬1')976 glp = GroupListPage()977 glp.click_star_icon()978 if glp.is_toast_exist('å·²åæ¶æ·»å 为ææ è系人'):979 time.sleep(2)980 else:981 time.sleep(1)982 glp.click_star_icon()983 time.sleep(1)984 # å é¤ç¾¤ç»985 glp.click_back_by_android()986 time.sleep(1)987 contact = ContactsPage()988 contact.click_label_grouping()989 time.sleep(1)990 glp.delete_group(name='aaa')991 except:992 pass993 @tags('ALL', 'CONTACT', 'CMCC')994 def test_contacts_quxinli_0395(self):995 """åç»è系人è¿å
¥Profile页-ç¼è¾"""996 glp = GroupListPage()997 glp.delete_group(name='aaa')998 glp.new_group(name='aaa')999 glp.click_text('aaa')1000 time.sleep(1)1001 glp.click_text('æ·»å æå')1002 time.sleep(1)1003 slcp = SelectLocalContactsPage()1004 slcp.swipe_select_one_member_by_name('大佬1')1005 slcp.swipe_select_one_member_by_name('大佬2')1006 slcp.click_sure()1007 time.sleep(1)1008 glp.enter_group_message()1009 glp.click_divide_group_icon()1010 time.sleep(1)1011 glp.page_contain_element(locator='åç»è系人_æ é¢')1012 glp.click_text("大佬1")1013 time.sleep(1)1014 cdp = ContactDetailsPage()1015 cdp.click_edit_contact()1016 time.sleep(1)1017 ccp = CreateContactPage()1018 ccp.click_input_number()1019 ccp.input_number('13800138006')1020 time.sleep(1)1021 cdp.click_sure_icon()1022 time.sleep(1)1023 cdp.click_edit_contact()1024 time.sleep(1)1025 ccp.click_input_number()1026 ccp.input_number('13800138005')1027 time.sleep(1)1028 cdp.click_sure_icon()1029 time.sleep(1)1030 glp.is_toast_exist("ä¿åæå")1031 cdp.is_text_present('13800138005')1032 def tearDown_test_contacts_quxinli_0395(self):1033 glp = GroupListPage()1034 glp.click_back_by_android(3)1035 glp.delete_group(name='aaa')1036 @tags('ALL', 'CONTACT', 'CMCC')1037 def test_contacts_quxinli_0396(self):1038 """åç»è系人è¿å
¥Profile页-ç¼è¾-å é¤è系人"""1039 glp = GroupListPage()1040 glp.delete_group(name='aaa')1041 glp.new_group(name='aaa')1042 # è¿å
¥åç» æ·»å æå1043 glp.click_text('aaa')1044 time.sleep(1)1045 glp.click_text('æ·»å æå')1046 time.sleep(1)1047 slcp = SelectLocalContactsPage()1048 slcp.swipe_select_one_member_by_name('大佬1')1049 slcp.swipe_select_one_member_by_name('大佬2')1050 slcp.click_sure()1051 time.sleep(1)1052 # è¿å
¥ç¾¤åæ¶æ¯é¡µé¢1053 glp.enter_group_message()1054 glp.click_divide_group_icon()1055 time.sleep(1)1056 glp.page_contain_element(locator='åç»è系人_æ é¢')1057 glp.click_text("大佬2")1058 time.sleep(2)1059 cdp = ContactDetailsPage()1060 cdp.click_edit_contact()1061 time.sleep(1)1062 cdp.hide_keyboard()1063 cdp.page_up()1064 cdp.change_delete_number()1065 time.sleep(1)1066 cdp.click_sure_delete()1067 time.sleep(1)1068 glp.click_back_by_android(2)1069 def tearDown_test_contacts_quxinli_0396(self):1070 glp = GroupListPage()1071 glp.delete_group(name='aaa')1072 time.sleep(1)1073 # å é¤è¯¥è系人åæ·»å è系人1074 glp.click_back_by_android()1075 time.sleep(1)1076 ContactsPage().click_add()1077 time.sleep(1)1078 ccp = CreateContactPage()1079 ccp.click_input_name()1080 ccp.input_name('大佬2')1081 ccp.click_input_number()1082 ccp.input_number('13800138006')1083 ccp.click_save()1084 @tags('ALL', 'CONTACT', 'å¤æ¹éè¯-è·³è¿')1085 def test_contacts_quxinli_0397(self):1086 """âåç»è¯¦æ
æä½âçé¢-å¤æ¹çµè¯"""1087 GroupPage = GroupListPage()1088 cdp=ContactDetailsPage()1089 time.sleep(1)1090 GroupPage.delete_group(name='aaa')1091 GroupPage.new_group(name='aaa')1092 #è¿å
¥ç¾¤ç»,æ·»å è系人1093 GroupPage.click_text('aaa')1094 GroupPage.tap_sure_box()1095 LabelGroupingChatPage().click_text('æ·»å æå')1096 slcp = SelectLocalContactsPage()1097 time.sleep(2)1098 slcp.swipe_select_one_member_by_name('大佬1')1099 slcp.swipe_select_one_member_by_name('大佬3')1100 slcp.click_sure()1101 time.sleep(1)1102 #å¤æ¹éè¯1103 GroupPage.enter_mutil_call()1104 time.sleep(1)1105 GroupPage.click_text("大佬1")1106 cdp.send_call_number()1107 if GroupPage.is_text_present('æç¥éäº'):1108 time.sleep(2)1109 GroupPage.click_text('æç¥éäº')1110 if GroupPage.is_text_present('åèµ·å¤æ¹çµè¯å¤±è´¥'):1111 pass1112 else:1113 # cdp.send_call_number()1114 cdp.cancel_permission()1115 time.sleep(3)1116 cdp.cancel_hefeixin_call()1117 time.sleep(2)1118 def tearDown_test_contacts_quxinli_0397(self):1119 GroupPage = GroupListPage()1120 GroupPage.click_back_button()1121 GroupPage.delete_group(name='aaa')1122 @tags('ALL', 'CONTACT', 'CMCC')1123 def test_contacts_quxinli_0398(self):1124 """âåç»è¯¦æ
æä½âçé¢-å¤æ¹è§é¢"""1125 GroupPage = GroupListPage()1126 cdp = ContactDetailsPage()1127 time.sleep(1)1128 GroupPage.delete_group(name='aaa')1129 GroupPage.new_group(name='aaa')1130 GroupPage.click_text('aaa')1131 GroupPage.tap_sure_box()1132 LabelGroupingChatPage().click_text('æ·»å æå')1133 slcp = SelectLocalContactsPage()1134 time.sleep(1)1135 slcp.swipe_select_one_member_by_name('大佬1')1136 time.sleep(1)1137 slcp.click_sure()1138 time.sleep(1)1139 GroupPage.enter_mutil_video_call()1140 time.sleep(2)1141 while GroupPage.is_text_present('å§ç»å
许'):1142 GroupPage.click_text('å§ç»å
许')1143 time.sleep(1)1144 GroupPage.click_text("大佬1")1145 time.sleep(2)1146 cdp.send_call_number()1147 if cdp.is_text_present('æä¸å¼å¯'):1148 cdp.cancel_permission()1149 cdp.end_video_call()1150 def tearDown_test_contacts_quxinli_0398(self):1151 GroupPage = GroupListPage()1152 time.sleep(1)1153 SelectOneGroupPage().click_back_by_android()1154 time.sleep(1)1155 GroupPage.delete_group(name='aaa')1156 @tags('ALL', 'CONTACT', 'CMCC')1157 def test_contacts_quxinli_0407(self):1158 """âåç»è®¾ç½®-ç¹æ®ç¬¦å·æ ç¾å称1159 auther:darcy1160 """1161 GroupPage = GroupListPage()1162 time.sleep(1)1163 GroupPage.delete_group(name='aaa')1164 GroupPage.new_group(name='aaa')1165 GroupPage.click_text('aaa')1166 GroupPage.tap_sure_box()1167 GroupPage.click_settings_button()1168 GroupPage.update_label_name(name='*@!#')1169 GroupPage.click_back_button(times=2)1170 GroupPage.page_should_contain_text(text='*@!#')1171 def tearDown_test_contacts_quxinli_0407(self):1172 GroupPage = GroupListPage()1173 GroupPage.delete_group(name='*@!#')1174 @tags('ALL', 'CONTACT', 'CMCC')1175 def test_contacts_quxinli_0408(self):1176 """âåç»è®¾ç½®-åç§æ ç¾å称1177 auther:darcy1178 """1179 GroupPage = GroupListPage()1180 time.sleep(1)1181 GroupPage.delete_group(name='aaa')1182 GroupPage.new_group(name='aaa')1183 GroupPage.click_text('aaa')1184 GroupPage.tap_sure_box()1185 GroupPage.click_settings_button()1186 GroupPage.update_label_name(name='*@!#123好')1187 GroupPage.click_back_button(times=2)1188 GroupPage.page_should_contain_text(text='*@!#123好')1189 def tearDown_test_contacts_quxinli_0408(self):1190 GroupPage = GroupListPage()1191 GroupPage.delete_group(name='*@!#123好')1192 @tags('ALL', 'CONTACT', 'CMCC')1193 def test_contacts_quxinli_0409(self):1194 """âåç»è®¾ç½®-åç§æ ç¾å称å é¤1195 auther:darcy1196 """1197 GroupPage = GroupListPage()1198 time.sleep(1)1199 GroupPage.delete_group(name='aaa')1200 GroupPage.new_group(name='aaa')1201 GroupPage.click_text('aaa')1202 GroupPage.tap_sure_box()1203 GroupPage.click_settings_button()1204 GroupPage.delete_label_name(name='*@!#123好')1205 GroupPage.page_should_contain_text(text="请è¾å
¥æ ç¾åç»å称")1206 GroupPage.click_back_button(times=3)1207 def tearDown_test_contacts_quxinli_0409(self):1208 GroupPage = GroupListPage()1209 GroupPage.delete_group(name='*@!#123好')1210 @tags('ALL', 'CONTACT-debug', 'CMCC')1211 def test_contacts_quxinli_0414(self):1212 """åç»è®¾ç½®-æ索移é¤æå1213 auther:darcy1214 """1215 GroupPage = GroupListPage()1216 time.sleep(1)1217 GroupPage.delete_group(name='aaa')1218 GroupPage.new_group(name='aaa')1219 #æ·»å æå1220 GroupPage.click_text('aaa')1221 GroupPage.tap_sure_box()1222 time.sleep(1)1223 LabelGroupingChatPage().click_text('æ·»å æå')1224 slcp = SelectLocalContactsPage()1225 time.sleep(1)1226 slcp.swipe_select_one_member_by_name('大佬1')1227 slcp.click_sure()1228 time.sleep(2)1229 #移é¤æå1230 GroupPage.click_settings_button()1231 GroupPage.click_move_label()1232 time.sleep(1)1233 GroupPage.search_menber_text(text='dalao1')1234 time.sleep(1)1235 GroupPage.click_text('大佬1')1236 time.sleep(1)1237 GroupPage.click_sure_element()1238 time.sleep(1)1239 GroupPage.click_move_label()1240 time.sleep(1)1241 GroupPage.page_should_not_contain_text("大佬1")1242 def tearDown_test_contacts_quxinli_0414(self):1243 GroupPage = GroupListPage()1244 GroupPage.click_back_button(times=3)1245 GroupPage.delete_group(name='aaa')1246 @tags('ALL', 'CONTACT-debug', 'CMCC')1247 def test_contacts_quxinli_0415(self):1248 """åç»è®¾ç½®-å é¤æ ç¾1249 auther:darcy1250 """1251 GroupPage = GroupListPage()1252 time.sleep(1)1253 GroupPage.new_group(name='ccc')1254 GroupPage.delete_group(name='ccc')1255 GroupPage.click_back_by_android(times=2)1256 @tags('ALL', 'CONTACT-debug', 'CMCC')1257 def test_contacts_quxinli_0416(self):1258 """åç»è¯¦æ
æä½é¡µé¢è¿å
¥Profile页"""1259 glp = GroupListPage()1260 glp.delete_group(name='aaa')1261 glp.new_group(name='aaa')1262 # æ·»å æå1263 glp.click_text('aaa')1264 time.sleep(1)1265 glp.click_text('æ·»å æå')1266 time.sleep(1)1267 slcp = SelectLocalContactsPage()1268 slcp.swipe_select_one_member_by_name('大佬3')1269 slcp.swipe_select_one_member_by_name('大佬4')1270 time.sleep(1)1271 slcp.click_sure()1272 time.sleep(1)1273 glp.enter_group_message()1274 glp.click_divide_group_icon()1275 time.sleep(1)1276 glp.page_contain_element(locator='åç»è系人_æ é¢')1277 glp.click_text("大佬3")1278 time.sleep(1)1279 glp.page_contain_element(locator='è¯é³éè¯')1280 glp.page_contain_element(locator='è§é¢éè¯')1281 glp.page_contain_element(locator='å享åç')1282 glp.click_share_button()1283 time.sleep(1)1284 scp = SelectContactsPage()1285 scp.click_select_one_group()1286 time.sleep(1)1287 scp.click_group_search()1288 time.sleep(3)1289 scp.group_search('ç»ä¸ªçº¢å
1')1290 time.sleep(3)1291 scp.select_one_group_by_name2('ç»ä¸ªçº¢å
1')1292 time.sleep(2)1293 scp.click_share_card()1294 time.sleep(2)1295 def tearDown_test_contacts_quxinli_0416(self):1296 glp = GroupListPage()1297 glp.click_back_by_android(3)1298 glp.delete_group(name='aaa')1299 @tags('ALL', 'CONTACT-debug', 'CMCC')1300 def test_contacts_quxinli_0417(self):1301 """åç»è¯¦æ
æä½é¡µé¢è¿å
¥Profile页_ææ """1302 glp = GroupListPage()1303 glp.delete_group(name='aaa')1304 glp.new_group(name='aaa')1305 # æ·»å æå1306 glp.click_text('aaa')1307 time.sleep(1)1308 glp.click_text('æ·»å æå')1309 time.sleep(1)1310 slcp = SelectLocalContactsPage()1311 slcp.swipe_select_one_member_by_name('大佬3')1312 slcp.swipe_select_one_member_by_name('大佬4')1313 time.sleep(1)1314 slcp.click_sure()1315 time.sleep(1)1316 # 群åä¿¡æ¯1317 glp.enter_group_message()1318 time.sleep(1)1319 glp.click_divide_group_icon()1320 time.sleep(1)1321 glp.page_contain_element(locator='åç»è系人_æ é¢')1322 glp.click_text("大佬3")1323 time.sleep(1)1324 glp.click_star_icon()1325 if glp.is_toast_exist('å·²æåæ·»å 为ææ è系人'):1326 time.sleep(1)1327 else:1328 time.sleep(1)1329 glp.click_star_icon()1330 glp.is_toast_exist("å·²æåæ·»å 为ææ è系人")1331 glp.click_back_by_android(times=5)1332 glp.page_contain_star('大佬3')1333 def tearDown_test_contacts_quxinli_0417(self):1334 # å»é¤'大佬3'çææ 1335 ContactsPage().select_contacts_by_name('大佬3')1336 time.sleep(1)1337 glp = GroupListPage()1338 glp.click_star_icon()1339 glp.is_toast_exist("å·²åæ¶æ·»å 为ææ è系人")1340 glp.click_back_by_android()1341 contact = ContactsPage()1342 contact.click_label_grouping()1343 glp.delete_group(name='aaa')1344 @tags('ALL', 'CONTACT', 'CMCC')1345 def test_contacts_quxinli_0421(self):1346 """å®åææºï¼ææºç³»ç»æ¬å°æ°å»ºåç»å称çäº30个å符çåç»1347 auther:darcy"""1348 GroupPage = GroupListPage()1349 time.sleep(1)1350 GroupPage.delete_group(name='aaa')1351 name="a"*301352 GroupPage.new_group(name=name)1353 GroupPage.click_text(name)1354 time.sleep(1)1355 GroupPage.tap_sure_box()1356 GroupPage.click_settings_button()1357 GroupPage.update_label_name(name='aaa')1358 GroupPage.click_back_button(times=2)1359 time.sleep(1)1360 GroupPage.page_should_contain_text(text='aaa')1361 #æ·»å æå1362 GroupPage.click_text('aaa')1363 GroupPage.tap_sure_box()1364 time.sleep(1)1365 LabelGroupingChatPage().click_text('æ·»å æå')1366 slcp = SelectLocalContactsPage()1367 time.sleep(1)1368 slcp.swipe_select_one_member_by_name('大佬6')1369 slcp.swipe_select_one_member_by_name('大佬7')1370 slcp.click_sure()1371 time.sleep(2)1372 #è¿å
¥è®¾ç½®çé¢1373 GroupPage.click_settings_button()1374 time.sleep(1)1375 GroupPage.click_move_label()1376 time.sleep(1)1377 GroupPage.click_text('大佬6')1378 time.sleep(1)1379 GroupPage.click_sure_element()1380 time.sleep(1)1381 GroupPage.click_move_label()1382 time.sleep(1)1383 GroupPage.page_should_not_contain_text("大佬6")1384 def tearDown_test_contacts_quxinli_0421(self):1385 Preconditions.enter_label_grouping_chat_page()1386 GroupPage = GroupListPage()1387 # GroupPage.click_back_button(times=4)1388 time.sleep(1)1389 GroupPage.delete_group(name='aaa')1390 @tags('ALL', 'CONTACT', 'CMCC')1391 def test_contacts_quxinli_0360(self):1392 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥30个æ°å"""1393 GroupPage = GroupListPage()1394 time.sleep(1)1395 LabelGroupingPage().delete_all_label()1396 GroupPage.click_new_group()1397 GroupPage.click_input_element()1398 time.sleep(1)1399 self.message1 = '2' * 301400 GroupPage.input_content(text=self.message1)1401 time.sleep(1)1402 GroupPage.click_sure_element()1403 time.sleep(1)1404 GroupPage.page_should_contain_text('éæ©è系人')1405 def tearDown_test_contacts_quxinli_0360(self):1406 GroupPage = GroupListPage()1407 Preconditions.enter_label_grouping_chat_page()1408 GroupPage.delete_group(name=self.message1)1409 @tags('ALL', 'CONTACT', 'CMCC')1410 def test_contacts_quxinli_0361(self):1411 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥31个æ°å"""1412 GroupPage = GroupListPage()1413 time.sleep(1)1414 GroupPage.click_new_group()1415 GroupPage.click_input_element()1416 text="1"*311417 GroupPage.input_content(text)1418 time.sleep(1)1419 name=GroupPage.get_text_of_lablegrouping_name()1420 self.assertNotEqual(text,name)1421 self.assertTrue(len(name) == 30)1422 #å é¤æ ç¾åç»1423 time.sleep(1)1424 LabelGroupingPage().click_back()1425 @tags('ALL', 'CONTACT', 'CMCC')1426 def test_contacts_quxinli_0362(self):1427 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥29个åæ¯"""1428 GroupPage = GroupListPage()1429 time.sleep(1)1430 GroupPage.click_new_group()1431 GroupPage.click_input_element()1432 time.sleep(1)1433 self.message = 'a' * 291434 GroupPage.input_content(text=self.message)1435 time.sleep(1)1436 GroupPage.click_sure_element()1437 time.sleep(1)1438 GroupPage.page_should_contain_text('éæ©è系人')1439 def tearDown_test_contacts_quxinli_0362(self):1440 GroupPage = GroupListPage()1441 GroupPage.click_back_button()1442 time.sleep(1)1443 GroupPage.click_back_button()1444 time.sleep(1)1445 GroupPage.delete_group(name=self.message)1446 @tags('ALL', 'debug', 'CMCC')1447 def test_contacts_quxinli_0363(self):1448 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥30个åæ¯"""1449 GroupPage = GroupListPage()1450 time.sleep(1)1451 GroupPage.click_new_group()1452 GroupPage.click_input_element()1453 time.sleep(1)1454 self.message2 = 'c' * 301455 GroupPage.input_content(text=self.message2)1456 time.sleep(1)1457 GroupPage.click_sure_element()1458 time.sleep(1)1459 GroupPage.page_should_contain_text('éæ©è系人')1460 def tearDown_test_contacts_quxinli_0363(self):1461 GroupPage = GroupListPage()1462 GroupPage.click_back_button()1463 time.sleep(1)1464 GroupPage.click_back_button()1465 time.sleep(1)1466 GroupPage.delete_group(name=self.message2)1467 @tags('ALL', 'CONTACT', 'CMCC')1468 def test_contacts_quxinli_0364(self):1469 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥31åæ¯"""1470 GroupPage = GroupListPage()1471 time.sleep(1)1472 GroupPage.click_new_group()1473 GroupPage.click_input_element()1474 text="a"*311475 GroupPage.input_content(text)1476 time.sleep(1)1477 name=GroupPage.get_text_of_lablegrouping_name()1478 self.assertNotEqual(text,name)1479 self.assertTrue(len(name) == 30)1480 #å é¤æ ç¾åç»1481 time.sleep(1)1482 LabelGroupingPage().click_back()1483 @tags('ALL', 'debug', 'CMCC')1484 def test_contacts_quxinli_0365(self):1485 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥29个å符ï¼æ±åãæ°åãè±æåæ¯ãç©ºæ ¼åç¹æ®å符ç»å"""1486 GroupPage = GroupListPage()1487 time.sleep(1)1488 GroupPage.click_new_group()1489 GroupPage.click_input_element()1490 time.sleep(1)1491 self.message3 = 'aa111@@@æ aaa111@@@æ aaaa'1492 GroupPage.input_content(text=self.message3)1493 time.sleep(1)1494 GroupPage.click_sure_element()1495 time.sleep(1)1496 GroupPage.page_should_contain_text('éæ©è系人')1497 def tearDown_test_contacts_quxinli_0365(self):1498 GroupPage = GroupListPage()1499 GroupPage.click_back_button()1500 time.sleep(1)1501 GroupPage.click_back_button()1502 time.sleep(1)1503 GroupPage.delete_group(name=self.message3)1504 @tags('ALL', 'debug', 'CMCC')1505 def test_contacts_quxinli_0366(self):1506 """æ°å»ºåç»,æ ç¾åç»å称è¾å
¥30个å符ï¼æ±åãæ°åãè±æåæ¯ãç©ºæ ¼åç¹æ®å符ç»å"""1507 GroupPage = GroupListPage()1508 time.sleep(1)1509 GroupPage.click_new_group()1510 GroupPage.click_input_element()1511 time.sleep(1)1512 self.message4 = 'aa111@@@æ aaa111@@@æ aaaaa'1513 GroupPage.input_content(text=self.message4)1514 time.sleep(1)1515 GroupPage.click_sure_element()1516 time.sleep(1)1517 GroupPage.page_should_contain_text('éæ©è系人')1518 def tearDown_test_contacts_quxinli_0366(self):1519 GroupPage = GroupListPage()1520 GroupPage.click_back_button()1521 time.sleep(1)1522 GroupPage.click_back_button()1523 time.sleep(1)1524 GroupPage.delete_group(name=self.message4)1525 @tags('ALL', 'CONTACT', 'CMCC')1526 def test_contacts_quxinli_0367(self):1527 '''1528 æ ç¾åç»å称è¾å
¥31个å符ï¼æ±åãæ°åãè±æåæ¯ãç©ºæ ¼åç¹æ®å符ç»å(ä¸æå æ®3个å符)1529 '''1530 GroupPage = GroupListPage()1531 time.sleep(1)1532 GroupPage.click_new_group()1533 GroupPage.click_input_element()1534 text="aa111@@@æ aaa111@@@æ aaaaad"1535 GroupPage.input_content(text)1536 time.sleep(1)1537 name=GroupPage.get_text_of_lablegrouping_name()1538 self.assertNotEqual(text,name)1539 self.assertTrue(len(name) == 26)1540 #å é¤æ ç¾åç»1541 time.sleep(1)1542 LabelGroupingPage().click_back()1543 @tags('ALL', 'debug', 'CMCC')1544 def test_contacts_quxinli_0368(self):1545 '''1546 æ°å»ºåç»è¿å
¥éæ©è系人页é¢åç¹å»è¿åï¼éåæ£æ¥1547 '''1548 GroupPage = GroupListPage()1549 time.sleep(1)1550 GroupPage.click_new_group()1551 GroupPage.click_input_element()1552 time.sleep(1)1553 self.message6 = 'aaaa'1554 GroupPage.input_content(text=self.message6)1555 time.sleep(1)1556 GroupPage.click_sure_element()1557 time.sleep(1)1558 GroupPage.click_back_button()1559 time.sleep(1)1560 GroupPage.click_sure_element()1561 LabelGroupingPage().is_group_exist_tips_popup()1562 # GroupPage.is_toast_exist('群ç»å·²åå¨')1563 def tearDown_test_contacts_quxinli_0368(self):1564 GroupPage = GroupListPage()1565 GroupPage.click_back_button()1566 time.sleep(1)1567 GroupPage.delete_group(name=self.message6)1568 @tags('ALL', 'debug', 'CMCC')1569 def test_contacts_quxinli_0391(self):1570 """åç»è¯¦æ
æä½çé¢-群åæ¶æ¯-å¤æ¹éè¯å¾æ """1571 glp = GroupListPage()1572 glp.delete_group(name='aaa')1573 glp.new_group(name='aaa')1574 # æ·»å è系人大佬1 大佬21575 time.sleep(2)1576 glp.click_text('aaa')1577 time.sleep(1)1578 glp.click_text('æ·»å æå')1579 time.sleep(1)1580 slcp = SelectLocalContactsPage()1581 slcp.swipe_select_one_member_by_name('大佬1')1582 time.sleep(1)1583 slcp.swipe_select_one_member_by_name('大佬2')1584 time.sleep(1)1585 slcp.click_sure()1586 time.sleep(2)1587 # å¤æ页é¢å
å«çå
ç´ 1588 glp.page_contain_element(locator='é£ä¿¡çµè¯')1589 glp.page_contain_element(locator='å¤æ¹è§é¢')1590 def tearDown_test_contacts_quxinli_0391(self):1591 glp = GroupListPage()1592 glp.delete_group(name='aaa')1593 @tags('ALL', 'CONTACT', 'CMCC')1594 def test_contacts_quxinli_0392(self):1595 """åç»è¯¦æ
æä½çé¢-群åæ¶æ¯-åç»è系人å¾æ """1596 glp = GroupListPage()1597 time.sleep(1)1598 glp.delete_group(name='aaa')1599 glp.new_group(name='aaa')1600 # æ·»å è系人大佬1 大佬21601 time.sleep(2)1602 glp.click_text('aaa')1603 time.sleep(1)1604 glp.click_text('æ·»å æå')1605 time.sleep(1)1606 slcp = SelectLocalContactsPage()1607 slcp.swipe_select_one_member_by_name('大佬1')1608 time.sleep(1)1609 slcp.swipe_select_one_member_by_name('大佬2')1610 slcp.click_sure()1611 time.sleep(2)1612 # å¤æ页é¢å
ç´ 1613 glp.click_send_message_to_group()1614 glp.click_divide_group_icon()1615 glp.page_should_contain_text("åç»è系人")1616 glp.page_should_contain_text("大佬1")1617 glp.page_should_contain_text("大佬2")1618 glp.check_if_contains_element(text='åç»è系人-å§å')1619 glp.check_if_contains_element(text='åç»è系人-çµè¯å·ç ')1620 def tearDown_test_contacts_quxinli_0392(self):1621 glp = GroupListPage()1622 glp.click_back_by_android(2)1623 glp.delete_group(name='aaa')1624 @tags('ALL', 'CONTACT', 'CMCC')1625 def test_contacts_quxinli_0393(self):1626 """åç»è系人è¿å
¥Profile页"""1627 glp = GroupListPage()1628 glp.delete_group(name='aaa')1629 glp.new_group(name='aaa')1630 # æ·»å è系人大佬1 大佬21631 glp.click_text('aaa')1632 time.sleep(1)1633 glp.click_text('æ·»å æå')1634 slcp = SelectLocalContactsPage()1635 slcp.swipe_select_one_member_by_name('大佬1')1636 slcp.swipe_select_one_member_by_name('大佬2')1637 slcp.click_sure()1638 time.sleep(2)1639 # å¤æ页é¢å
ç´ 1640 glp.click_send_message_to_group()1641 time.sleep(1)1642 glp.click_divide_group_icon()1643 time.sleep(1)1644 glp.page_contain_element(locator='åç»è系人_æ é¢')1645 glp.click_text("大佬1")1646 time.sleep(1)1647 detailpage = ContactDetailsPage()1648 detailpage.is_exists_contacts_name()1649 detailpage.is_exists_contacts_number()1650 detailpage.page_should_contain_element_first_letter2()1651 if detailpage.is_text_present("å
¬å¸"):1652 detailpage.page_should_contain_text('å
¬å¸')1653 if detailpage.is_text_present("èä½"):1654 detailpage.page_should_contain_text('èä½')1655 if detailpage.is_text_present("é®ç®±"):1656 detailpage.page_should_contain_text('é®ç®±')1657 detailpage.page_should_contain_text('æ¶æ¯')1658 detailpage.page_should_contain_text('çµè¯')1659 detailpage.page_should_contain_text('è¯é³éè¯')1660 detailpage.page_should_contain_text('è§é¢éè¯')1661 detailpage.page_should_contain_text('é£ä¿¡çµè¯')1662 detailpage.page_should_contain_text('å享åç')1663 time.sleep(1)1664 detailpage.click_share_business_card()1665 time.sleep(1)1666 SelectContactsPage().select_local_contacts()1667 time.sleep(1)1668 SelectContactsPage().click_one_contact('大佬1')1669 time.sleep(1)1670 SelectContactsPage().click_share_card()1671 def tearDown_test_contacts_quxinli_0393(self):1672 glp = GroupListPage()1673 glp.click_back_by_android(3)1674 glp.delete_group(name='aaa')1675 @tags('ALL', 'CONTACT', 'CMCC')1676 def test_contacts_quxinli_0399(self):1677 """âåç»è®¾ç½®å
¥å£"""1678 glp = GroupListPage()1679 glp.delete_group(name='aaa')1680 glp.new_group(name='aaa')1681 glp.click_text('aaa')1682 glp.tap_sure_box()1683 glp.click_settings_button()1684 glp.page_contain_element("æ ç¾è®¾ç½®")1685 def tearDown_test_contacts_quxinli_0399(self):1686 glp = GroupListPage()1687 glp.click_back_button(times=2)1688 glp.delete_group(name='aaa')1689 @tags('ALL', 'CONTACT', 'CMCC')1690 def test_contacts_quxinli_0400(self):1691 """âåç»è®¾ç½®è¿åï¼"""1692 glp = GroupListPage()1693 glp.delete_group(name='aaa')1694 glp.new_group(name='aaa')1695 glp.click_text('aaa')1696 glp.tap_sure_box()1697 glp.click_settings_button()1698 glp.click_back_button(times=1)1699 glp.page_not_contain_element("æ ç¾è®¾ç½®")1700 def tearDown_test_contacts_quxinli_0400(self):1701 glp = GroupListPage()1702 glp.click_back_button(times=1)1703 glp.delete_group(name='aaa')1704 @tags('ALL', 'CONTACT', 'CMCC')1705 def test_contacts_quxinli_0401(self):1706 """âåç»è®¾ç½®çé¢"""1707 glp = GroupListPage()1708 glp.delete_group(name='aaa')1709 glp.new_group(name='aaa')1710 glp.click_text('aaa')1711 glp.tap_sure_box()1712 glp.click_settings_button()1713 glp.page_contain_element("æ ç¾è®¾ç½®")1714 glp.page_contain_element("å é¤æ ç¾")1715 glp.page_contain_element("移é¤æå")1716 glp.page_contain_element("æ ç¾å称")1717 def tearDown_test_contacts_quxinli_0401(self):1718 glp = GroupListPage()1719 glp.click_back_button(times=1)1720 glp.delete_group(name='aaa')1721 @tags('ALL', 'CONTACT', 'CMCC')1722 def test_contacts_quxinli_0402(self):1723 """âåç»è®¾ç½®-æ ç¾å称"""1724 glp = GroupListPage()1725 glp.delete_group(name='aaa')1726 glp.new_group(name='aaa')1727 glp.click_text('aaa')1728 glp.tap_sure_box()1729 glp.click_settings_button()1730 glp.click_label_name()1731 glp.page_contain_element("ä¿®æ¹æ ç¾å称")1732 def tearDown_test_contacts_quxinli_0402(self):1733 glp = GroupListPage()1734 glp.click_back_button(times=3)1735 glp.delete_group(name='aaa')1736 @tags('ALL', 'CONTACT', 'CMCC')1737 def test_contacts_quxinli_0403(self):1738 """âåç»è®¾ç½®-åæ¯æ ç¾å称"""1739 glp = GroupListPage()1740 glp.delete_group(name='aaa')1741 glp.new_group(name='aaa')1742 glp.click_text('aaa')1743 glp.tap_sure_box()1744 glp.click_settings_button()1745 glp.update_label_name(name='bbb')1746 glp.click_back_button(times=2)1747 glp.page_should_contain_text(text='bbb')1748 def tearDown_test_contacts_quxinli_0403(self):1749 glp = GroupListPage()1750 glp.delete_group(name='bbb')1751 @tags('ALL', 'CONTACT', 'CMCC')1752 def test_contacts_quxinli_0404(self):1753 """âåç»è®¾ç½®-ä¸ææ ç¾å称"""1754 glp = GroupListPage()1755 glp.delete_group(name='aaa')1756 glp.new_group(name='aaa')1757 glp.click_text('aaa')1758 glp.tap_sure_box()1759 glp.click_settings_button()1760 glp.update_label_name(name='好记æ§')1761 glp.click_back_button(times=2)1762 glp.page_should_contain_text(text='好记æ§')1763 def tearDown_test_contacts_quxinli_0404(self):1764 glp = GroupListPage()1765 glp.delete_group(name='好记æ§')1766 @tags('ALL', 'CONTACT', 'CMCC')1767 def test_contacts_quxinli_0405(self):1768 """âåç»è®¾ç½®-æ°åæ ç¾å称1769 auther:darcy1770 """1771 glp = GroupListPage()1772 glp.delete_group(name='aaa')1773 glp.new_group(name='aaa')1774 glp.click_text('aaa')1775 glp.tap_sure_box()1776 glp.click_settings_button()1777 glp.update_label_name(name='111')1778 glp.click_back_button(times=2)1779 glp.page_should_contain_text(text='111')1780 def tearDown_test_contacts_quxinli_0405(self):1781 glp = GroupListPage()1782 glp.delete_group(name='111')1783 @tags('ALL', 'CONTACT', 'CMCC')1784 def test_contacts_quxinli_0406(self):1785 """âåç»è®¾ç½®-符å·æ ç¾å称1786 auther:darcy1787 """1788 GroupPage = GroupListPage()1789 time.sleep(1)1790 GroupPage.delete_group(name='aaa')1791 GroupPage.new_group(name='aaa')1792 GroupPage.click_text('aaa')1793 GroupPage.tap_sure_box()1794 GroupPage.click_settings_button()1795 GroupPage.update_label_name(name='ï¼ï¼ï¼')1796 GroupPage.click_back_button(times=2)1797 GroupPage.page_should_contain_text(text='ï¼ï¼ï¼')1798 def tearDown_test_contacts_quxinli_0406(self):1799 GroupPage = GroupListPage()1800 GroupPage.delete_group(name='ï¼ï¼ï¼')1801 @tags('ALL', 'CONTACT', 'CMCC')1802 def test_contacts_quxinli_0410(self):1803 """âåç»è®¾ç½®-移é¤æåå
¥å£1804 auther:darcy1805 """1806 GroupPage = GroupListPage()1807 time.sleep(1)1808 GroupPage.delete_group(name='aaa')1809 GroupPage.new_group(name='aaa')1810 GroupPage.click_text('aaa')1811 GroupPage.tap_sure_box()1812 GroupPage.click_settings_button()1813 GroupPage.click_move_label()1814 GroupPage.page_contain_element(locator="移é¤æå_æ é¢")1815 GroupPage.page_contain_element(locator="æç´¢æ ç¾åç»æå")1816 GroupPage.click_back_button(times=3)1817 def tearDown_test_contacts_quxinli_0410(self):1818 GroupPage = GroupListPage()1819 GroupPage.delete_group(name='aaa')1820 @tags('ALL', 'CONTACT', 'CMCC')1821 def test_contacts_quxinli_0411(self):1822 """âåç»è®¾ç½®-åç»è®¾ç½®-移é¤æå1823 auther:darcy1824 """1825 GroupPage = GroupListPage()1826 time.sleep(1)1827 GroupPage.delete_group(name='aaa')1828 GroupPage.new_group(name='aaa')1829 GroupPage.click_text('aaa')1830 GroupPage.tap_sure_box()1831 GroupPage.click_settings_button()1832 GroupPage.click_move_label()1833 GroupPage.click_sure_element()1834 GroupPage.page_contain_element(locator="移é¤æå_æ é¢")1835 def tearDown_test_contacts_quxinli_0411(self):1836 GroupPage = GroupListPage()1837 GroupPage.click_back_button(times=3)1838 GroupPage.delete_group(name='aaa')1839 @tags('ALL', 'CONTACT', 'CMCC')1840 def test_contacts_quxinli_0412(self):1841 """åç»è®¾ç½®-移é¤æåéæ©"""1842 glp = GroupListPage()1843 glp.delete_group(name='aaa')1844 glp.new_group(name='aaa')1845 # æ·»å è系人大佬1 大佬21846 time.sleep(1)1847 glp.click_text('aaa')1848 time.sleep(1)1849 glp.click_text('æ·»å æå')1850 time.sleep(1)1851 slcp = SelectLocalContactsPage()1852 slcp.swipe_select_one_member_by_name('大佬1')1853 slcp.swipe_select_one_member_by_name('大佬2')1854 slcp.click_sure()1855 time.sleep(3)1856 # å¤æ页é¢å
ç´ 1857 glp.click_settings_button()1858 glp.click_move_label()1859 glp.click_text('大佬2')1860 time.sleep(1)1861 glp.page_contain_element(locator="æå头å")1862 glp.sure_icon_is_checkable()1863 glp.click_sure_element()1864 time.sleep(1)1865 glp.click_back_by_android(1)1866 glp.page_should_not_contain_text("大佬2")1867 def tearDown_test_contacts_quxinli_0412(self):1868 glp = GroupListPage()1869 glp.delete_group(name='aaa')1870 @tags('ALL', 'CONTACT', 'CMCC')1871 def test_contacts_quxinli_0413(self):1872 """åç»è®¾ç½®-移é¤æå"""1873 glp = GroupListPage()1874 glp.delete_group(name='aaa')1875 glp.new_group(name='aaa')1876 # æ·»å è系人大佬1 大佬21877 time.sleep(2)1878 glp.click_text('aaa')1879 time.sleep(1)1880 glp.click_text('æ·»å æå')1881 time.sleep(1)1882 slcp = SelectLocalContactsPage()1883 slcp.swipe_select_one_member_by_name('大佬1')1884 slcp.swipe_select_one_member_by_name('大佬2')1885 slcp.click_sure()1886 time.sleep(1)1887 # å¤æ页é¢å
ç´ 1888 glp.click_settings_button()1889 glp.click_move_label()1890 glp.click_text('大佬2')1891 time.sleep(1)1892 glp.click_sure_element()1893 time.sleep(1)1894 glp.click_move_label()1895 time.sleep(1)1896 glp.page_should_not_contain_text("大佬2")1897 glp.is_element_present(locator='移é¤-å·²éæ©è系人')1898 def tearDown_test_contacts_quxinli_0413(self):1899 glp = GroupListPage()1900 glp.click_back_button(times=3)1901 glp.delete_group(name='aaa')1902if __name__ == '__main__':...
delete_group_test.py
Source:delete_group_test.py
...14 "members": [{"id": "ok"}],15 "admins": [{"id": "ok"}]16 }17 saved_group = client.create_group(new_group, status=200)18 result = client.delete_group(saved_group["id"], status=200)19 assert_that(result["status"], is_("Deleted"))20 finally:21 if result:22 client.delete_group(saved_group["id"], status=(200, 404))23def test_delete_group_not_found(shared_zone_test_context):24 """25 Tests that deleting a group that does not exist returns a 40426 """27 client = shared_zone_test_context.ok_vinyldns_client28 client.delete_group("doesntexist", status=404)29def test_delete_group_that_is_already_deleted(shared_zone_test_context):30 """31 Tests that deleting a group that is already deleted32 """33 client = shared_zone_test_context.ok_vinyldns_client34 saved_group = None35 try:36 new_group = {37 "name": f"test-delete-group-already{shared_zone_test_context.partition_id}",38 "email": "test@test.com",39 "description": "this is a description",40 "members": [{"id": "ok"}],41 "admins": [{"id": "ok"}]42 }43 saved_group = client.create_group(new_group, status=200)44 client.delete_group(saved_group["id"], status=200)45 client.delete_group(saved_group["id"], status=404)46 finally:47 if saved_group:48 client.delete_group(saved_group["id"], status=(200, 404))49def test_delete_admin_group(shared_zone_test_context):50 """51 Tests that we cannot delete a group that is the admin of a zone52 """53 client = shared_zone_test_context.ok_vinyldns_client54 result_group = None55 result_zone = None56 try:57 # Create group58 new_group = {59 "name": "test-delete-group-already",60 "email": "test@test.com",61 "description": "this is a description",62 "members": [{"id": "ok"}],63 "admins": [{"id": "ok"}]64 }65 result_group = client.create_group(new_group, status=200)66 # Create zone with that group ID as admin67 zone = {68 "name": f"one-time{shared_zone_test_context.partition_id}.",69 "email": "test@test.com",70 "adminGroupId": result_group["id"],71 "connection": {72 "name": "vinyldns.",73 "keyName": VinylDNSTestContext.dns_key_name,74 "key": VinylDNSTestContext.dns_key,75 "primaryServer": VinylDNSTestContext.name_server_ip76 },77 "transferConnection": {78 "name": "vinyldns.",79 "keyName": VinylDNSTestContext.dns_key_name,80 "key": VinylDNSTestContext.dns_key,81 "primaryServer": VinylDNSTestContext.name_server_ip82 }83 }84 result = client.create_zone(zone, status=202)85 result_zone = result["zone"]86 client.wait_until_zone_active(result["zone"]["id"])87 client.delete_group(result_group["id"], status=400)88 # Delete zone89 client.delete_zone(result_zone["id"], status=202)90 client.wait_until_zone_deleted(result_zone["id"])91 # Should now be able to delete group92 client.delete_group(result_group["id"], status=200)93 finally:94 if result_zone:95 client.delete_zone(result_zone["id"], status=(202, 404))96 if result_group:97 client.delete_group(result_group["id"], status=(200, 404))98def test_delete_group_not_authorized(shared_zone_test_context):99 """100 Tests that only the admins can delete a zone101 """102 ok_client = shared_zone_test_context.ok_vinyldns_client103 not_admin_client = shared_zone_test_context.dummy_vinyldns_client104 try:105 new_group = {106 "name": "test-delete-group-not-authorized",107 "email": "test@test.com",108 "description": "this is a description",109 "members": [{"id": "ok"}],110 "admins": [{"id": "ok"}]111 }112 saved_group = ok_client.create_group(new_group, status=200)113 not_admin_client.delete_group(saved_group["id"], status=403)114 finally:115 if saved_group:...
test_delete.py
Source:test_delete.py
...10 assert delete_group.body_parameters() == {}11@unittest.mock.patch('requests.Session.request')12def test_delete_calls_requests(mock, engine_url):13 delete_group = pycamunda.group.Delete(url=engine_url, id_='anId')14 delete_group()15 assert mock.called16 assert mock.call_args[1]['method'].upper() == 'DELETE'17@unittest.mock.patch('requests.Session.request', raise_requests_exception_mock)18def test_delete_raises_pycamunda_exception(engine_url):19 delete_group = pycamunda.group.Delete(url=engine_url, id_='anId')20 with pytest.raises(pycamunda.PyCamundaException):21 delete_group()22@unittest.mock.patch('requests.Session.request', not_ok_response_mock)23@unittest.mock.patch('pycamunda.base._raise_for_status')24def test_delete_raises_for_status(mock, engine_url):25 delete_group = pycamunda.group.Delete(url=engine_url, id_='anId')26 delete_group()27 assert mock.called28@unittest.mock.patch('requests.Session.request', unittest.mock.MagicMock())29def test_delete_returns_group(engine_url):30 delete_group = pycamunda.group.Delete(url=engine_url, id_='anId')31 result = delete_group()...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!