コード例 #1
0
 def test_course_state(self):
     course = Activity.objects.create(name="test",
                                      activity_data={"label": "test"},
                                      activity_type="course")
     course.student.add(self.user)
     Activity.objects.create(name="test",
                             activity_type="pltp",
                             parent=course)
     self.assertEqual(
         Answer.course_state(course)[0]['user_id'], self.user.id)
コード例 #2
0
 def test_course_state(self):
     course = Course.objects.create(name="test", label="test")
     course.student.add(self.user)
     Activity.objects.create(name="test", pltp=self.pltp, course=course)
     self.assertEqual(
         Answer.course_state(course)[0]['user_id'], self.user.id)