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)
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)
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()
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()
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()
def testPracticeToStringReturnPracticeUid(self): uid = "practice_uid" practice = Practice() practice.uid = uid self.assertEqual(str(practice), uid)
def setUp(self): self.student = Student() self.student.uid = "Nombre y Apellido" self.practice = Practice() self.practice.uid = "Tp inicial"