Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/openai/openai-python
/ Model
Class
Model
tests/test_models.py:162–163 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
160
161
def
test_strict_validation_unknown_fields() -> None:
162
class
Model(BaseModel):
163
foo: str
164
165
model = parse_obj(Model, dict(foo=
"hello!"
, user=
"Robert"
))
166
assert model.foo ==
"hello!"
Callers
5
test_to_dict
Function · 0.70
test_forwards_compat_model_dump_method
Function · 0.70
test_compat_method_no_error_for_warnings
Function · 0.70
test_to_json
Function · 0.70
test_forwards_compat_model_dump_json_method
Function · 0.70
Calls
no outgoing calls
Tested by
5
test_to_dict
Function · 0.56
test_forwards_compat_model_dump_method
Function · 0.56
test_compat_method_no_error_for_warnings
Function · 0.56
test_to_json
Function · 0.56
test_forwards_compat_model_dump_json_method
Function · 0.56