'Restrict the user from accessing the course.'

def _restrict_course(self, course_key):

    country = Country.objects.create(country='us')
    restricted_course = RestrictedCourse.objects.create(course_key=course_key, enroll_msg_key='embargo', access_msg_key='embargo')
    CountryAccessRule.objects.create(restricted_course=restricted_course, rule_type=CountryAccessRule.BLACKLIST_RULE, country=country)
