Ejemplo n.º 1
0
    def test_index_of_student_student_present(self):
        test_class = ClassList(3)
        test_class.add_student('Harry')
        test_class.add_student('Hermione')
        test_class.add_student('Ron')

        self.assertIsNotNone(test_class.index_of_student('Harry'))
Ejemplo n.º 2
0
    def test_student_not_in_list(self):
        test_class = ClassList(2)
        test_class.add_student('Taylor Swift')
        test_class.add_student('Kanye West')

        self.assertIsNone(test_class.index_of_student('Jim Beam'))