Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdeldjalil-H committed Apr 25, 2024
1 parent b2ea03e commit 8627d00
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/contrib/test_pydantic.py
Expand Up @@ -1278,6 +1278,11 @@ def test_config_classes_merge_all_configs(self):
PydanticModel.model_config["from_attributes"],
)

def test_exclude_read_only(self):
ModelPydantic = pydantic_model_creator(User, exclude_readonly=True)

self.assertNotIn("id", ModelPydantic.model_json_schema()["properties"])


class TestPydanticCycle(test.TestCase):
async def asyncSetUp(self) -> None:
Expand Down

0 comments on commit 8627d00

Please sign in to comment.