'This test is designed to hit a specific set of use cases having to do with
the child positioning logic found in split_mongo/split.py:create_child()'

def test_split_modulestore_create_child_with_position(self):

    store = modulestore()
    user = random.getrandbits(32)
    course_key = CourseLocator('test_org', 'test_transaction', 'test_run')
    with store.bulk_operations(course_key):
        new_course = store.create_course('test_org', 'test_transaction', 'test_run', user, BRANCH_NAME_DRAFT)
        new_course_locator = new_course.id
        versionless_course_locator = new_course_locator.version_agnostic()
        first_child = store.create_child(self.user_id, new_course.location, 'chapter')
        refetch_course = store.get_course(versionless_course_locator)
        second_child = store.create_child(self.user_id, refetch_course.location, 'chapter', position=0)
        refetch_course = store.get_course(versionless_course_locator)
        children = refetch_course.get_children()
        self.assertEqual(unicode(children[1].location), unicode(first_child.location))
        self.assertEqual(unicode(children[0].location), unicode(second_child.location))
        store.delete_course(refetch_course.id, user)
