'Create a course in a specified module store with discussion xblocks and topics'

def create_course(self, modules_count, module_store, topics):

    course = CourseFactory.create(org=u'a', course=u'b', run=u'c', start=datetime.now(UTC), default_store=module_store, discussion_topics=topics)
    CourseEnrollmentFactory.create(user=self.user, course_id=course.id)
    course_url = reverse(u'course_topics', kwargs={u'course_id': unicode(course.id)})
    for i in range(modules_count):
        ItemFactory.create(parent_location=course.location, category=u'discussion', discussion_id=u'id_module_{}'.format(i), discussion_category=u'Category    {}'.format(i), discussion_target=u'Discussion    {}'.format(i), publish_item=False)
    return course_url
