'Assertion for verifying response contents.'

def assert_related_programs(self, response, are_programs_present=True):

    assertion = getattr(self, 'assert{}Contains'.format(('' if are_programs_present else 'Not')))
    for program in self.programs:
        assertion(response, self.expected_link_text(program))
    assertion(response, self.related_programs_preface)
