'Find a file in the repository and display the contents.'

def display_repository_file_contents(self, repository, filename, filepath=None, strings_displayed=None, strings_not_displayed=None):

    basepath = self.get_repo_path(repository)
    repository_file_list = []
    if filepath:
        relative_path = os.path.join(basepath, filepath)
    else:
        relative_path = basepath
    repository_file_list = self.get_repository_file_list(repository=repository, base_path=relative_path, current_path=None)
    assert (filename in repository_file_list), ('File    %s    not    found    in    the    repository    under    %s.' % (filename, relative_path))
    params = dict(file_path=os.path.join(relative_path, filename), repository_id=self.security.encode_id(repository.id))
    url = '/repository/get_file_contents'
    self.visit_url(url, params=params)
    self.check_for_strings(strings_displayed, strings_not_displayed)
