()
| 121 | |
| 122 | |
| 123 | def test_raw_dictionary() -> None: |
| 124 | class NestedModel(BaseModel): |
| 125 | nested: Dict[str, str] |
| 126 | |
| 127 | m = NestedModel.construct(nested={"hello": "world"}) |
| 128 | assert m.nested == {"hello": "world"} |
| 129 | |
| 130 | # mismatched types |
| 131 | m = NestedModel.construct(nested=False) |
| 132 | assert cast(Any, m.nested) is False |
| 133 | |
| 134 | |
| 135 | def test_nested_dictionary_model() -> None: |