def test_is_class_full(self): test_class = ClassList(2) test_class.add_student('Taylor Swift') test_class.add_student('Kanye West') self.assertTrue(test_class.is_class_full()) test_class.remove_student('Taylor Swift') self.assertFalse(test_class.is_class_full())
def test_remove_student_not_in_list(self): test_class = ClassList(2) with self.assertRaises(StudentError): test_class.remove_student('Test Student')
def test_add_remove_student(self): test_class = ClassList(2) test_class.add_student('Test Student') test_class.remove_student('Test Student') self.assertNotIn('Test Student', test_class.class_list)