test(integration): add list_value helper

Prerequisite for the backport of #46099 to stable/1.103.x: its integration
tests import list_value, which reached main in #43981.
Hand-ported from 43f07d0bd8 (main).
This commit is contained in:
devin-ai-integration[bot] 2026-10-16 13:33:44 -05:00 • committed by Mrinal Chanshetty
parent 65e36b0298
commit 69ff376019

View file

@ -3,7 +3,7 @@ from __future__ import annotations
import os
import time
import uuid
from collections.abc import Callable, Iterator, Mapping
from collections.abc import Callable, Iterator, Mapping, Sequence
from contextlib import ExitStack, contextmanager
from dataclasses import dataclass
from hashlib import sha256
@ -22,6 +22,11 @@ def object_value(value: JsonValue) -> dict[str, JsonValue]:
return JSON_OBJECT.validate_python(value)
def list_value(value: JsonValue) -> Sequence[JsonValue]:
assert isinstance(value, list), f"Expected a list, received {type(value).__name__}"
return value
def string_value(value: JsonValue) -> str:
assert isinstance(value, str), f"Expected a string, received {type(value).__name__}"
return value