'Test that giving a user a course role enables access appropriately'

def test_course_role(self):

    self.assertFalse(CourseStaffRole(self.course_key).has_user(self.student), 'Student    has    premature    access    to    {}'.format(self.course_key))
    CourseStaffRole(self.course_key).add_users(self.student)
    self.assertTrue(CourseStaffRole(self.course_key).has_user(self.student), "Student    doesn't    have    access    to    {}".format(unicode(self.course_key)))
    CourseStaffRole(self.course_key).remove_users(self.student)
    self.assertFalse(CourseStaffRole(self.course_key).has_user(self.student), 'Student    still    has    access    to    {}'.format(self.course_key))
