Ejemplo n.º 1
0
    def test_remove_subject_raises_lookup_error_if_name_that_does_not_exist_in_subjects_list(
            self):
        year = Year(year=11)

        with self.assertRaises(LookupError):
            year.remove_subject('Math')
Ejemplo n.º 2
0
    def test_can_remove_a_subject_from_the_list_of_subjects(self):
        year = Year(year=11)
        year.extend_subjects(subjects=[Subject('Math')])
        year.remove_subject(remove='Math')

        self.assertEqual(year.subjects, [])