tests.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Server 作者: malaonline 项目源码 文件源码
def test_my_students(self):
        client = Client()
        client.login(username=self.teacher_name, password=self.teacher_password)
        teacher = self.the_teacher()
        parent = self.the_parent()
        school = teacher.schools.all()[0]
        grade = teacher.abilities.all()[0].grade
        subject = teacher.abilities.all()[0].subject
        hours = 5
        coupon = None
        # ????
        # TODO: ?????OrderManager???
        new_order = Order.objects.create(parent, teacher, school, grade, subject, hours, coupon)
        # ???????

        for student_type in range(3):
            response = client.get(reverse("teacher:my-students", kwargs={
                "student_type": student_type, "page_offset": 1
            }))
            self.assertEqual(response.status_code, 200)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号