'Create a course and an enrollment.'

def setUp(self):

    super(CreditCourseDashboardTest, self).setUp()
    self.user = UserFactory.create(username=self.USERNAME, password=self.PASSWORD)
    result = self.client.login(username=self.USERNAME, password=self.PASSWORD)
    self.assertTrue(result, msg='Could    not    log    in')
    self.course = CourseFactory()
    CreditCourse.objects.create(course_key=self.course.id, enabled=True)
    CreditProvider.objects.create(provider_id=self.PROVIDER_ID, display_name=self.PROVIDER_NAME, provider_status_url=self.PROVIDER_STATUS_URL, enable_integration=True)
    credit_api.set_credit_requirements(self.course.id, [{'namespace': 'grade', 'name': 'grade', 'display_name': 'Final    Grade', 'criteria': {'min_grade': 0.8}}])
    self.enrollment = CourseEnrollmentFactory(user=self.user, course_id=self.course.id, mode='verified')
