'Create a stock course with a specific due date.
:param course_kwargs: All kwargs are passed to through to the :class:`CourseFactory`'

def set_up_course(self, **course_kwargs):

    course = CourseFactory.create(**course_kwargs)
    with self.store.bulk_operations(course.id):
        chapter = ItemFactory.create(category='chapter', parent_location=course.location)
        section = ItemFactory.create(category='sequential', parent_location=chapter.location, due=datetime(2013, 9, 18, 11, 30, 0), format='homework')
        vertical = ItemFactory.create(category='vertical', parent_location=section.location)
        ItemFactory.create(category='problem', parent_location=vertical.location)
    course = modulestore().get_course(course.id)
    self.assertIsNotNone(course.get_children()[0].get_children()[0].due)
    CourseEnrollmentFactory(user=self.user, course_id=course.id)
    return course
