Beispiel #1
0
 def test_del_hdk(self):
     '''删除互动课'''
     print "exec:test_del_hdk..."
     driver = self.driver
     user_login(driver, **loginInfo)
     del_hdk(driver)
     sleep(2)
     print "exec:test_del_hdk successed."
 def test_aconfLocalInteract(self):
     '''添加配置中心消息中间件'''
     print 'exec:test_confLocalInteract...'
     L_INFO(logger, "添加消息中间件")
     driver = self.driver
     user_login(driver, **loginInfo)
     add_interacts(driver, **middle_interacts)
     conf_interact_local(driver, middle_interact_ip)
     print 'exec:test_confLocalInteract end.'
Beispiel #3
0
 def test_del_excellentLesson(self):
     '''删除精品课'''
     print "exec:excellentLesson..."
     driver = self.driver
     user_login(driver, **loginInfo)
     # del excellentClass
     del_excellentClass(driver)
     sleep(2)
     print "exec:excellentLesson end."
Beispiel #4
0
 def test_bupdate_interactgrp(self):
     '''修改互动组信息'''
     print "exec:test_bupdate_interactgrp"
     driver = self.driver
     user_login(driver, **loginInfo)
     for operater in interactiveData:
         update_Interactive(driver, **operater)
     print "exec: test_bupdate_interactgrp success."
     sleep(0.5)
 def test_confMCU(self):
     '''配置节点中间件'''
     print 'Exec:test_confChildInteract...'
     L_INFO(logger, "配置消息中间件管理的设备")
     driver = self.driver
     user_login(driver, **loginInfo)
     conf_drivers_local(driver)
     # conf_drivers_child(driver)
     print 'exec:test_confChildInteract end.'
    def test_bupdate_subjectgrp(self):
        '''修改组管理'''
        print "exec:test_bupdate_subjectgrp"

        driver = self.driver
        user_login(driver, **loginInfo)
        for itme in modifysubjectsGroup:
            update_subjectGrp(driver, **itme)
        print "exec test_bupdate_subjectgrp success"
        sleep(0.5)
Beispiel #7
0
    def test_add_jpk(self):
        '''添加精品课堂'''

        print "exec: generate jplk start..."
        driver = self.driver
        user_login(driver, **loginInfo)

        add_jpk_18(driver)
        sleep(2)
        print "exec: generate jpk end."
Beispiel #8
0
    def test_del_school_ok(self):
        '''删除学校_确定'''
        print "执行:删除学校_确定"
        driver = self.driver
        user_login(driver, **init.loginInfo)

        for flag in schoolDel:
            del_school(driver, **flag)
            # self.assertEqual(u"删除成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
        sleep(0.5)
Beispiel #9
0
    def test_bupdate_cfg_speaker_lessons(self):
        '''修改主讲下课模板信息'''
        print "exec:test_bupdate_cfg_speaker_lessons"
        #
        driver = self.driver
        user_login(driver, **loginInfo)

        for speaker_lesson_cfg in theClassData:
            update_TheClass(driver, **speaker_lesson_cfg)
        print "exec: test_bupdate_cfg_speaker_lessons success."
        sleep(0.5)
Beispiel #10
0
    def test_bupdate_cfg_hdks(self):
        '''修改互动课模板信息'''
        print "exec:test_bupdate_cfg_hdks"

        driver = self.driver
        user_login(driver, **loginInfo)

        for hdk_lesson_cfg in interactiveTeachingData:
            update_InteractiveTeaching(driver, **hdk_lesson_cfg)
        print "exec: test_bupdate_cfg_hdks success."
        sleep(0.5)
Beispiel #11
0
    def test_bupdate_cfg_jpks(self):
        '''修改精品课模板信息'''
        print "exec:test_bupdate_cfg_jpks"

        driver = self.driver
        user_login(driver, **loginInfo)

        for jp_lesson_cfg in excellentClassroomData:
            update_ExcellentClassroom(driver, **jp_lesson_cfg)
        print "exec: test_bupdate_cfg_jpks success."
        sleep(0.5)
    def test_bupdate_knowledge(self):
        '''修改知识点信息'''
        print "exec:test_bupdate_knowledge"

        driver = self.driver
        user_login(driver, **loginInfo)

        for knowledge in knowledgeData:
            update_Knowledge(driver, **knowledge)
        print "exec: test_bupdate_knowledge success."
        sleep(1)
Beispiel #13
0
    def test_bupdate_subjects(self):
        '''修改科目信息'''
        print "exec:test_bupdate_subjects"

        driver = self.driver
        user_login(driver, **loginInfo)

        for subject in subjectsData:
            update_Subjects(driver, **subject)
        print "exec: test_bupdate_subjects success."
        sleep(0.5)
Beispiel #14
0
    def test_update_emails(self):
        '''修改邮件服务器'''
        print "exec:test_update_emails..."

        driver = self.driver
        user_login(driver, **loginInfo)

        for email in smtpData:
            update_Smtp(driver, **email)
        sleep(0.5)
        print "exec:test_update_emails success."
Beispiel #15
0
    def test_bupdate_section(self):
        '''查询节信息'''
        print "exec:test_search_section"

        driver = self.driver
        user_login(driver, **loginInfo)

        for section in sectionData:
            update_Section(driver, **section)
        print "exec: test_search_section success."
        sleep(0.5)
Beispiel #16
0
    def test_bupdate_cfg_listener_lessons(self):
        '''查询听讲下课模板信息'''
        print "exec:test_search_cfg_listener_lessons"

        driver = self.driver
        user_login(driver, **loginInfo)

        for listener_lesson_cfg in classOverData:
            update_ClassOver(driver, **listener_lesson_cfg)
        print "exec: test_bsearch_cfg_listener_lessons success."
        sleep(0.5)
Beispiel #17
0
    def test_bupdate_cfg_confrences(self):
        '''修改会议模板信息'''
        print "exec:test_bupdate_cfg_confrences"

        driver = self.driver
        user_login(driver, **loginInfo)

        for conference_cfg in VideoConferencingData:
            update_VideoConferencing(driver, **conference_cfg)
        print "exec: test_bupdate_cfg_confrences success."
        sleep(0.5)
    def test_bupdate_interacts(self):
        '''修改单条中心设备消息中间件数据'''
        print "exec:test_bupdate_interacts"

        driver = self.driver
        user_login(driver, **loginInfo)

        for interact in middlewareData:
            update_Middleware(driver, **interact)
        print "exec: test_bupdate_interacts success."
        sleep(0.5)
Beispiel #19
0
    def test_bupdate_MCUequipment(self):
        '''查询中心设备MCU信息'''
        print "exec:test_bupdate_MCUequipment"

        driver = self.driver
        user_login(driver, **loginInfo)

        for MCUequipment in equipmentData:
            update_Equipment(driver, **MCUequipment)
        print "exec: test_bupdate_MCUequipment success."
        sleep(0.5)
    def test_bupdate_chapter(self):
        '''修改章信息'''
        print "exec:test_bupdate_chapter"

        driver = self.driver
        user_login(driver, **loginInfo)

        for chapter in chapterData:
            update_Chapter(driver, **chapter)
        print "exec: test_bupdate_chapter success."
        sleep(0.5)
Beispiel #21
0
    def test_add_emails(self):
        '''添加邮件服务器'''
        print "exec:test_add_emails..."

        driver = self.driver
        user_login(driver, **loginInfo)

        for email in emails:
            add_emails(driver, **email)
            self.assertEqual(u"添加成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
        sleep(0.5)
        print "exec:test_add_emails success."
    def test_add_knowledges(self):
        '''添加知识点'''
        print "exec:test_add_knowledges..."

        driver = self.driver
        user_login(driver, **loginInfo)

        for knowledge in knowledges:
            add_knowledges(driver, **knowledge)
            self.assertEqual(u"添加成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
        sleep(0.5)
        print "exec:test_add_knowledges success."
Beispiel #23
0
    def test_add_cfg_speaker_lessons(self):
        '''添加主讲下课模板'''
        print "exec:test_add_cfg_speaker_lessons..."

        driver = self.driver
        user_login(driver, **loginInfo)

        for speaker_lesson_cfg in speaker_lesson_cfgs:
            add_cfg_speaker_lessons(driver, **speaker_lesson_cfg)
            self.assertEqual(u"添加成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
        sleep(0.5)
        print "exec:test_add_cfg_speaker_lessons success."
    def test_del_subjectgrp_ok(self):
        '''删除科目组_确定'''
        print "exec:test_del_subjectgrp_ok..."

        driver = self.driver
        user_login(driver, **loginInfo)

        for searchsubjectGrp in searchsubjectGrps:
            del_subjectGrp(driver, **searchsubjectGrp)
            self.assertEqual(u"删除成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
            sleep(0.5)
        print "exec:test_del_subjectgrp_ok success."
    def test_add_subjectgrp(self):
        '''添加教室'''
        print "exec:test_add_subjectgrp..."

        driver = self.driver
        user_login(driver, **loginInfo)

        for subjectsGroup in subjectsGroups:
            add_groupsubGrps(driver, **subjectsGroup)
            self.assertEqual(u"添加成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
        sleep(0.5)
        print "exec:test_add_subjectgrp success."
    def test_bsearch_subjectgrp(self):
        '''查询教室信息'''
        print "exec:test_bsearch_subjectgrp"

        driver = self.driver
        user_login(driver, **loginInfo)
        for searchsubjectGrp in searchsubjectGrps:
            search_subjectGrp(driver, **searchsubjectGrp)
            self.assertEqual(searchsubjectGrp['groupName'],
                             driver.find_element_by_xpath("//table[@id='SchoolGroupmodaltab']/tbody/tr/td").text)
        print "exec test_bsearch_subjectgrp success"
        sleep(0.5)
Beispiel #27
0
    def test_update_role(self):
        '''修改角色'''
        print "exec:test_update_role..."

        driver = self.driver
        user_login(driver, **loginInfo)

        for role in roleData:
            update_roleManagement(driver, **role)
            # self.assertEqual(u"修改成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
        sleep(0.5)
        print "exec:test_add_role success."
    def test_add_interacts(self):
        '''添加消息中间'''
        print "exec:test_add_interacts..."

        driver = self.driver
        user_login(driver, **loginInfo)

        for interact in interacts:
            add_interacts(driver, **interact)
            self.assertEqual(u"添加成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
        sleep(0.5)
        print "exec:test_add_interacts success."
    def test_add_MCUequipments(self):
        '''添加MCU'''
        print "exec:test_add_MCUequipments..."
        L_INFO(logger, "添加MCU")
        driver = self.driver
        user_login(driver, **loginInfo)

        for MCUequipment in MCUequipments:
            add_MCUequipments(driver, **MCUequipment)
        # self.assertEqual(u"保存成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
        sleep(0.5)
        print "exec:test_add_MCUequipments success."
Beispiel #30
0
    def test_del_emails(self):
        '''删除邮件服务器_确定'''
        print "exec:test_del_emails..."

        driver = self.driver
        user_login(driver, **loginInfo)

        for email in emails:
            del_email(driver)
            sleep(1.5)
            self.assertEqual(u"删除成功!", driver.find_element_by_css_selector(".layui-layer-content").text)
            sleep(0.5)
        print "exec:test_del_emails success."