def test_viewCourseAssign_Ta_2CourseLab_1Course(self): self.lab2 = Section.objects.create(number='801', course=self.course2) AccountSection.objects.create(Account=self.account2, Section=self.lab2) AccountCourse.objects.create(Account=self.account2, Course=self.course3) self.assertEqual(viewCourseAssign("taman"), "taman is assigned to: IntroSoftwareEngineering section 801, English section 801, History")
def test_viewCourseAssign_Ta_1CourseLab_1Course(self): AccountCourse.objects.create(Account=self.account2, Course=self.course2) self.assertEqual(viewCourseAssign("taman"), "taman is assigned to: IntroSoftwareEngineering section 801, English")
def test_viewCourseAssign_TA_noLabs(self): AccountSection.objects.get(Account=self.account2).delete() self.assertEqual(viewCourseAssign("taman"), "taman is assigned to: IntroSoftwareEngineering")
def test_viewCourseAssign_TA_CourseLab(self): self.assertEqual(viewCourseAssign("taman"), "taman is assigned to: IntroSoftwareEngineering section 801")
def test_viewCourseAssign_Instructor_2Course(self): self.assertEqual(viewCourseAssign("instructor"), "instructor is assigned to: IntroSoftwareEngineering, English")
def test_viewCourseAssign_Instructor_1Course(self): AccountCourse.objects.get(Account=self.account1, Course=self.course2).delete() self.assertEqual(viewCourseAssign("instructor"), "instructor is assigned to: IntroSoftwareEngineering")
def test_viewCourseAssign_noAssignments(self): self.assertEqual(viewCourseAssign("joe"), "joe does not have any assignments")
def test_viewCourseAssign_accountNotFound(self): self.assertEqual(viewCourseAssign("homer"), "Account not found")