def teststeps(self):
        STEP(1, "新建一个老师")
        data = [{"id": GSTORE['g_classid']}]
        classid = json.dumps(data)
        r = steacher.add_teacher('hwd', '汉武帝', 1, classid, '13600000000',
                                 '*****@*****.**', '3209251983090987899')
        addret = r.json()
        self.addteacherid = addret['id']
        STEP(2, '验证参数返回值')
        CHECK_POINT('返回的retcode值=0', addret['retcode'] == 0)
        STEP(3, '新建一个学生')
        r = sstudent.add_student('cyj', '程咬金', 1, GSTORE['g_classid'],
                                 13451810000)
        addret = r.json()
        self.addstudentid = addret['id']
        CHECK_POINT('返回的retcode值=0', addret['retcode'] == 0)
        STEP(4, '教师发布作业')
        teacherOp.teacher_login('hwd', '888888')
        teacherOp.pushtask()

        STEP(5, "学生账号登录")
        studentOp.student_login("cyj", "888888")
        student_info = studentOp.submittask()
        INFO(student_info)
        STEP(6, "教师登录检查错题")
        time.sleep(2)
        teacherOp.teacher_login('hwd', '888888')
        info = teacherOp.get_analysis_error()
        expect = '共有3道错题上榜'
        CHECK_POINT('错题数目正确', info == expect)
Ejemplo n.º 2
0
    def teststeps(self):
        STEP(1, "新建一个老师")
        data = [{"id": GSTORE['g_classid']}]
        classid = json.dumps(data)
        r = steacher.add_teacher('hwd', '汉武帝', 1, classid, '13600000000',
                                 '*****@*****.**', '3209251983090987899')
        addret = r.json()
        self.addteacherid = addret['id']
        STEP(2, '验证参数返回值')
        CHECK_POINT('返回的retcode值=0', addret['retcode'] == 0)
        STEP(3, '新建一个学生')
        r = sstudent.add_student('cyj', '程咬金', 1, GSTORE['g_classid'],
                                 13451810000)
        addret = r.json()
        self.addstudentid = addret['id']
        CHECK_POINT('返回的retcode值=0', addret['retcode'] == 0)
        STEP(4, '教师发布作业')
        teacherOp.teacher_login('hwd', '888888')
        teacherOp.pushtask()

        STEP(5, "学生账号登录")
        studentOp.student_login("cyj", "888888")
        info = studentOp.getMyTask()
        INFO(info)
        expect = ['汉武帝', '初中数学']
        CHECK_POINT("任务信息显示正确", info == expect)
Ejemplo n.º 3
0
 def teststeps(self):
     STEP(1, '新建一个学生')
     r = sstudent.add_student('cyj', '程咬金', 1, GSTORE['g_classid'],
                              13451810000)
     addret = r.json()
     self.addstudentid = addret['id']
     CHECK_POINT('返回的retcode值=0', addret['retcode'] == 0)
     STEP(2, "学生账号登录")
     studentOp.student_login("cyj", "888888")
     info = studentOp.getMyTask()
     INFO(info)
     expect = '没有发现作业任务'
     CHECK_POINT("内容显示正确", info == expect)
Ejemplo n.º 4
0
 def teststeps(self):
     STEP(1, '新建一个学生')
     r = sstudent.add_student('cyj', '程咬金', 1, GSTORE['g_classid'],
                              13451810000)
     addret = r.json()
     self.addstudentid = addret['id']
     CHECK_POINT('返回的retcode值=0', addret['retcode'] == 0)
     STEP(2, "学生账号登录")
     studentOp.student_login("cyj", "888888")
     info = studentOp.get_Personal_Info()
     INFO(info)
     expect = [
         'cyj', '13451810000', '程咬金', '七年级 高三25班', '白月学院00002', '广东省深圳市南山区'
     ]
     CHECK_POINT("内容显示正确", info == expect)
Ejemplo n.º 5
0
 def teststeps(self):
     STEP(1, "新建一个学生")
     r = sstudent.add_student("yuchigong", "尉迟恭", 3, GSTORE["g_classid"],
                              13451810000)
     addret = r.json()
     self.addtid = addret["id"]
     STEP(2, "学生账号登录")
     studentOp.student_login("yuchigong", "888888")
     homeinfo = studentOp.gethomepageinfo()
     expect = ['尉迟恭', '白月学院00002', '0', '0']
     STEP(3, "验证主页信息")
     CHECK_POINT("主页信息显示正确", homeinfo == expect)
     STEP(4, "验证学生列表")
     classinfo = studentOp.getwrong_questionsinfo_none()
     expect1 = "您尚未有错题入库哦"
     INFO(expect1)
     CHECK_POINT("班级学生列表为空", classinfo == expect1)
Ejemplo n.º 6
0
 def teststeps(self):
     STEP(1, "新建一个老师")
     data = [{"id": GSTORE['g_classid']}]
     classid = json.dumps(data)
     r = steacher.add_teacher('hwd', '汉武帝', 1, classid, '13600000000',
                              '*****@*****.**', '3209251983090987899')
     addret = r.json()
     self.addteacherid = addret['id']
     STEP(2, '验证参数返回值')
     CHECK_POINT('返回的retcode值=0', addret['retcode'] == 0)
     STEP(3, '新建一个学生')
     r = sstudent.add_student('cyj', '程咬金', 1, GSTORE['g_classid'],
                              13451810000)
     addret = r.json()
     self.addstudentid = addret['id']
     CHECK_POINT('返回的retcode值=0', addret['retcode'] == 0)
     STEP('4', '有班主任')
     studentOp.student_login("cyj", "888888")
     info = studentOp.get_Personal_Info()
     INFO(info)
     expect = '初中数学老师:汉武帝'
     CHECK_POINT("班主任信息显示正确", info == expect)