()
| 136 | |
| 137 | |
| 138 | def test_raw_dictionary() -> None: |
| 139 | class NestedModel(BaseModel): |
| 140 | nested: Dict[str, str] |
| 141 | |
| 142 | m = NestedModel.construct(nested={"hello": "world"}) |
| 143 | assert m.nested == {"hello": "world"} |
| 144 | |
| 145 | # mismatched types |
| 146 | m = NestedModel.construct(nested=False) |
| 147 | assert cast(Any, m.nested) is False |
| 148 | |
| 149 | |
| 150 | def test_nested_dictionary_model() -> None: |