Skip to content

Commit

Permalink
✅ Fix tests for CLI, const_to_literal with Pydantic model and Enum wi…
Browse files Browse the repository at this point in the history
…th the same class name
  • Loading branch information
tiangolo committed Apr 18, 2024
1 parent 969f63f commit d1631ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/integration/cases/replace_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
"from pydantic import BaseModel, Field",
"",
"",
"class A(str, Enum):",
"class E(str, Enum):",
" a = 'a'",
" b = 'b'",
"",
"class A(BaseModel):",
" a: A = Field(A.a, const=True)",
" a: E = Field(E.a, const=True)",
],
),
expected=File(
Expand All @@ -70,12 +70,12 @@
"from typing import Literal",
"",
"",
"class A(str, Enum):",
"class E(str, Enum):",
" a = 'a'",
" b = 'b'",
"",
"class A(BaseModel):",
" a: Literal[A.a] = A.a",
" a: Literal[E.a] = E.a",
],
),
),
Expand Down

0 comments on commit d1631ec

Please sign in to comment.