fix(backend): add description and credentials_fields to mock block in tests

MagicMock auto-generates MagicMock for .description which is truthy,
bypassing the `or ""` fallback and causing Pydantic validation error
in BlockInfoSummary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nicholas Tindle
2026-02-08 20:56:39 -06:00
parent f6abd17910
commit 2c07b2fa31

View File

@@ -23,10 +23,12 @@ def make_mock_block(
mock = MagicMock()
mock.id = block_id
mock.name = name
mock.description = f"{name} description"
mock.block_type = block_type
mock.disabled = disabled
mock.input_schema = MagicMock()
mock.input_schema.jsonschema.return_value = {"properties": {}, "required": []}
mock.input_schema.get_credentials_fields.return_value = {}
mock.output_schema = MagicMock()
mock.output_schema.jsonschema.return_value = {}
mock.categories = []