MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / test_bad_schema

Function test_bad_schema

tests/forms/test_validator.py:104–115  ·  view source on GitHub ↗
(tmp_path: pathlib.Path, schema: dict, expected_errors: list)

Source from the content-addressed store, hash-verified

102 ],
103)
104def test_bad_schema(tmp_path: pathlib.Path, schema: dict, expected_errors: list):
105 doc_file = tmp_path / "forms.yaml"
106 with doc_file.open("wt") as fo:
107 yaml.dump(schema, fo)
108 with pytest.raises(ValidationError) as exc:
109 validate_doc(doc_file)
110
111 def del_url(d):
112 del d["url"]
113 return d
114
115 assert list(map(del_url, exc.value.errors())) == expected_errors
116
117
118def test_validate_cmd(tmp_path: pathlib.Path, cli_runner: CliRunner):

Callers

nothing calls this directly

Calls 1

validate_docFunction · 0.90

Tested by

no test coverage detected