Skip to content

MockInput

Source code in docs_src/capo_sfn/types/mock_input.py
class MockInput(TypedDict, closed=True):
    result: NotRequired["capo_sfn.types.sensitive_data.SensitiveData"]
    """<p>A JSON string containing the mocked result of the state invocation.</p>"""
    error_output: NotRequired["capo_sfn.types.mock_error_output.MockErrorOutput"]
    """<p>The mocked error output when calling TestState. When specified, the mocked response is returned as a JSON object that contains an <code>error</code> and <code>cause</code> field.</p>"""
    field_validation_mode: NotRequired[
        "capo_sfn.types.mock_response_validation_mode.MockResponseValidationMode"
    ]
    """<p>Determines the level of strictness when validating mocked results against their respective API models. Values include:</p> <ul> <li> <p> <code>STRICT</code>: All required fields must be present, and all present fields must conform to the API's schema.</p> </li> <li> <p> <code>PRESENT</code>: All present fields must conform to the API's schema.</p> </li> <li> <p> <code>NONE</code>: No validation is performed.</p> </li> </ul> <p>If no value is specified, the default value is <code>STRICT</code>.</p>"""

error_output instance-attribute

error_output: NotRequired[MockErrorOutput]

The mocked error output when calling TestState. When specified, the mocked response is returned as a JSON object that contains an error and cause field.

field_validation_mode instance-attribute

field_validation_mode: NotRequired[MockResponseValidationMode]

Determines the level of strictness when validating mocked results against their respective API models. Values include:

  • STRICT: All required fields must be present, and all present fields must conform to the API's schema.

  • PRESENT: All present fields must conform to the API's schema.

  • NONE: No validation is performed.

If no value is specified, the default value is STRICT.

result instance-attribute

result: NotRequired[SensitiveData]

A JSON string containing the mocked result of the state invocation.