From 96779752047b995a1ca886d10c3a92ca6c212422 Mon Sep 17 00:00:00 2001 From: Nikita Pastukhov Date: Tue, 14 Nov 2023 15:43:49 +0300 Subject: [PATCH] test: use IsOneOf --- tests/test_annotated.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_annotated.py b/tests/test_annotated.py index 50443533d..f430d1fb5 100644 --- a/tests/test_annotated.py +++ b/tests/test_annotated.py @@ -1,5 +1,5 @@ import pytest -from dirty_equals import IsDict, IsStr +from dirty_equals import IsDict, IsOneOf from fastapi import APIRouter, FastAPI, Query from fastapi.testclient import TestClient from fastapi.utils import match_pydantic_error_url @@ -57,11 +57,11 @@ foo_is_short = { { "ctx": {"min_length": 1}, "loc": ["query", "foo"], - "msg": ( + "msg": IsOneOf( # PydanticV2.4 - IsStr("String should have at least 1 characters") or + "String should have at least 1 characters", # PydanticV2.5 - IsStr("String should have at least 1 character"), + "String should have at least 1 character", ), "type": "string_too_short", "input": "",