'Create a course and user to test with.'

def setUp(self):

    super(BadgrBackendTestCase, self).setUp()
    self.course = CourseFactory.create(org='edX', course='course_test', run='test_run', display_name='Badged', start=datetime(year=2015, month=5, day=19), end=datetime(year=2015, month=5, day=20))
    self.user = UserFactory.create(email='example@example.com')
    CourseEnrollmentFactory.create(user=self.user, course_id=self.course.location.course_key, mode='honor')
    BadgrBackend.badges = []
    self.badge_class = BadgeClassFactory.create(course_id=self.course.location.course_key)
    self.legacy_badge_class = BadgeClassFactory.create(course_id=self.course.location.course_key, issuing_component='')
    self.no_course_badge_class = BadgeClassFactory.create()
