'Checks that the course was created properly.'

def assert_created_course(self, number_suffix=None):

    test_course_data = {}
    test_course_data.update(self.course_data)
    if number_suffix:
        test_course_data['number'] = '{0}_{1}'.format(test_course_data['number'], number_suffix)
    course_key = _get_course_id(self.store, test_course_data)
    _create_course(self, course_key, test_course_data)
    self.assertTrue(CourseEnrollment.is_enrolled(self.user, course_key))
    return test_course_data
