def test_check_authorized_type(self): education_group = EducationGroupYearFactory() AuthorizedRelationshipFactory( parent_type=education_group.education_group_type) result = check_authorized_type(education_group) self.assertTrue(result)
def test_check_authorized_type_without_parent(self): result = check_authorized_type(None) self.assertTrue(result)
def test_check_unauthorized_type(self): education_group = EducationGroupYearFactory() result = check_authorized_type(education_group) self.assertFalse(result)