'Setup for tests using split_test module. Creates a split_test instance as a child of self.homework_conditional
with 2 verticals in it, and assigns self.student_user to the specified user_partition_group.
The verticals are returned.'

def split_setup(self, user_partition_group):

    vertical_0_url = self.course.id.make_usage_key('vertical', 'split_test_vertical_0')
    vertical_1_url = self.course.id.make_usage_key('vertical', 'split_test_vertical_1')
    group_id_to_child = {}
    for (index, url) in enumerate([vertical_0_url, vertical_1_url]):
        group_id_to_child[str(index)] = url
    split_test = ItemFactory.create(parent_location=self.homework_conditional.location, category='split_test', display_name='Split    test', user_partition_id='0', group_id_to_child=group_id_to_child)
    vertical_0 = ItemFactory.create(parent_location=split_test.location, category='vertical', display_name='Condition    0    vertical', location=vertical_0_url)
    vertical_1 = ItemFactory.create(parent_location=split_test.location, category='vertical', display_name='Condition    1    vertical', location=vertical_1_url)
    UserCourseTagFactory(user=self.student_user, course_id=self.course.id, key='xblock.partition_service.partition_{0}'.format(self.partition.id), value=str(user_partition_group))
    return (vertical_0, vertical_1)
