def _get_context(requester_id, is_requester_privileged, is_cohorted=False, thread=None):
 return {'cc_requester': User(id=requester_id), 'is_requester_privileged': is_requester_privileged, 'course': CourseFactory(cohort_config={'cohorted': is_cohorted}), 'thread': thread}

def _get_context ( requester_id , is_requester_privileged , is_cohorted = False , thread = None ) : return { 'cc_requester' : User ( id = requester_id ) , 'is_requester_privileged' : is_requester_privileged , 'course' : CourseFactory ( cohort_config = { 'cohorted' : is_cohorted } ) , 'thread' : thread }
return a context suitable for testing the permissions module .