Пример #1
0
 def test_validInsCourseDNHIns(self):
     self.assertEqual(
         "Employee successfully assigned to section",
         assignEmployeeToSection("*****@*****.**", "Section 1", "Class 1"),
         msg=
         "Entering a valid instructor for a course that does not have an instructor assigned to "
         "it fails to return the correct message")
Пример #2
0
 def test_validTA(self):
     self.assertEqual(
         "Employee successfully assigned to section",
         assignEmployeeToSection("*****@*****.**", "Section 1", "Class 1"),
         msg=
         "Successfully assigning a valid TA to a course fails to return correct message"
     )
Пример #3
0
 def test_validInsCourseHasIns(self):
     self.assertEqual(
         "Employee successfully assigned to section",
         assignEmployeeToSection("*****@*****.**", "Section 1", "Class 1"),
         msg=
         "Entering a valid Instructor for a course they are already assigned to fails to return the"
         " correct message")
Пример #4
0
 def test_assignInsNotCourseIns(self):
     self.assertEqual(
         "Course has different Instructor assigned to it, cannot assign new instructor to section",
         assignEmployeeToSection("*****@*****.**", "Section 2", "Class 2"),
         msg=
         "Entering an instruction different from the instructor already assigned to the course "
         "fails to return the correct message")
Пример #5
0
 def test_employeeSupervisor(self):
     self.assertEqual(
         "You cannot assign a supervisor to a section",
         assignEmployeeToSection("*****@*****.**", "Section 1", "Class 1"),
         msg="Entering a supervisor fails to return correct message")
Пример #6
0
 def test_employeeDNE(self):
     self.assertEqual(
         "Employee does not exist",
         assignEmployeeToSection("*****@*****.**", "Section 1", "Class 1"),
         msg="Entering an employee that DNE fails to return correct message"
     )
Пример #7
0
 def test_sectionDNE(self):
     self.assertEqual(
         "Section does not exist",
         assignEmployeeToSection("*****@*****.**", "Section 0", "Class 1"),
         msg="Entering a section that DNE fails to return message")
Пример #8
0
 def test_courseDNE(self):
     self.assertEqual(
         "Course does not exist",
         assignEmployeeToSection("*****@*****.**", "Section 1", "Class 0"),
         msg="Entering a course that DNE fails to return correct message")