'Helper method that sets the user_partition_id to the supplied value.
The updated split_test instance is returned.'

def _update_partition_id(self, partition_id):

    self.client.ajax_post(self.split_test_update_url, data={'metadata': {'user_partition_id': str(partition_id)}})
    split_test = self.get_item_from_modulestore(self.split_test_usage_key, verify_is_draft=True)
    self.assertEqual(partition_id, split_test.user_partition_id)
    return split_test
