示例#1
0
 def testPracticeShouldFeatureSomeWrapperToAccessTheAssociatedScript(self):
     practice = Practice()
     practice.uid = "uid"
     practice.course = self.course
     practice.file = "pathFile"
     practice.deadline = "2012-12-01" 
     practice.save()
     script = Script()
     script.practice = practice
     script.save()
     self.assertEquals(practice.get_script(), script)
示例#2
0
 def testPracticeCreationCompareName(self):
     pPractice = Practice()
     pPractice.uid = "1"
     pPractice.course = self.course
     pPractice.file = "pathFile"
     pPractice.deadline = "2012-12-01" 
     pPractice.save()
     cPractice = Practice.objects.get(uid="1")
     self.assertEqual(pPractice.course.name, cPractice.course.name)
示例#3
0
def step(context, practice_uid, course_name, dead_line):
    c = Course.objects.get(name=course_name)
    if (Practice.objects.filter(uid=practice_uid).exists()):
        Practice.objects.get(uid=practice_uid).delete()
    practice = Practice()
    practice.uid = practice_uid
    practice.deadline = dead_line
    practice.course = c
    practice.blocker = True
    practice.save()
示例#4
0
def step (context, practice_uid, course_name, dead_line):
    c = Course.objects.get(name=course_name)
    if(Practice.objects.filter(uid=practice_uid).exists()):
        Practice.objects.get(uid=practice_uid).delete()
    practice = Practice()
    practice.uid = practice_uid
    practice.deadline = dead_line
    practice.course = c
    practice.blocker = True
    practice.save()
示例#5
0
    def setUp(self):
        nameCourse = '2012-2'
        course = Course()
        course.name = nameCourse
        course.save()

        student = Student()
        student.uid = "85000"
        student.save()

        practice = Practice()
        practice.uid = "Tp inicial"
        practice.course = course
        practice.file = "pathFile"
        practice.deadline = "2012-12-01"
        practice.save()
示例#6
0
 def setUp(self):
     nameCourse = '2012-2'
     course = Course()
     course.name = nameCourse
     course.save()
     
     student = Student()
     student.uid = "85000"
     student.save()
     
     practice = Practice()
     practice.uid = "Tp inicial"
     practice.course = course
     practice.file = "pathFile"
     practice.deadline = "2012-12-01" 
     practice.save()
示例#7
0
 def testPracticeToStringReturnPracticeUid(self):
     uid = "practice_uid"
     practice = Practice()
     practice.uid = uid
     self.assertEqual(str(practice), uid)
示例#8
0
 def setUp(self):
     self.student = Student()
     self.student.uid = "Nombre y Apellido"
     self.practice = Practice()
     self.practice.uid = "Tp inicial"
示例#9
0
 def testPracticeToStringReturnPracticeUid(self):
     uid = "practice_uid"
     practice = Practice()
     practice.uid = uid
     self.assertEqual(str(practice), uid)