| 125 | |
| 126 | def test_on_validate_python_on_success() -> None: |
| 127 | class CustomOnValidatePython(ValidatePythonHandlerProtocol): |
| 128 | def on_enter( |
| 129 | self, |
| 130 | input: Any, |
| 131 | *, |
| 132 | strict: bool | None = None, |
| 133 | extra: ExtraValues | None = None, |
| 134 | from_attributes: bool | None = None, |
| 135 | context: Any | None = None, |
| 136 | self_instance: Any | None = None, |
| 137 | by_alias: bool | None = None, |
| 138 | by_name: bool | None = None, |
| 139 | ) -> None: |
| 140 | assert input == {'a': 1} |
| 141 | assert strict is None |
| 142 | assert extra is None |
| 143 | assert context is None |
| 144 | assert self_instance is None |
| 145 | |
| 146 | def on_success(self, result: Any) -> None: |
| 147 | assert isinstance(result, Model) |
| 148 | |
| 149 | class Plugin: |
| 150 | def new_schema_validator(self, schema, schema_type, schema_type_path, schema_kind, config, plugin_settings): |
no outgoing calls