Skip to content

Commit

Permalink
patch tests + import
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-giglio committed Nov 5, 2024
1 parent 8b86656 commit 735103b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import fern.ir.resources as ir_types

from fern_python.codegen import AST, LocalClassReference, SourceFile
from fern_python.external_dependencies.pydantic import PydanticVersionCompatibility
from fern_python.pydantic_codegen import PydanticField, PydanticModel

from ..context import PydanticGeneratorContext
Expand Down
4 changes: 2 additions & 2 deletions generators/python/tests/sdk/test_custom_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def test_parse_wrapped_aliases() -> None:
"wrapped_aliases": True,
},
}
with pytest.raises(pydantic.ValidationError, match="Wrapped aliases are only supported in Pydantic V1, please update your `version` field to be 'v1' to continue using wrapped aliases."):
SDKCustomConfig.parse_obj(v2)
sdk_custom_config = SDKCustomConfig.parse_obj(v2)
assert sdk_custom_config.pydantic_config.version == "v2" and sdk_custom_config.pydantic_config.wrapped_aliases is True

both = {
"pydantic_config": {
Expand Down

0 comments on commit 735103b

Please sign in to comment.