MCPcopy Index your code
hub / github.com/github/spec-kit / test_add_catalog

Method test_add_catalog

tests/test_workflows.py:4826–4836  ·  view source on GitHub ↗
(self, project_dir)

Source from the content-addressed store, hash-verified

4824 catalog._validate_catalog_url("http://localhost:8080/step-catalog.json")
4825
4826 def test_add_catalog(self, project_dir):
4827 from specify_cli.workflows.catalog import StepCatalog
4828
4829 catalog = StepCatalog(project_dir)
4830 catalog.add_catalog("https://example.com/new-steps.json", "my-steps")
4831
4832 config_path = project_dir / ".specify" / "step-catalogs.yml"
4833 assert config_path.exists()
4834 data = yaml.safe_load(config_path.read_text())
4835 assert len(data["catalogs"]) == 1
4836 assert data["catalogs"][0]["url"] == "https://example.com/new-steps.json"
4837
4838 def test_add_catalog_empty_yaml_file(self, project_dir):
4839 """An empty YAML config file should be treated as empty, not corrupted."""

Callers

nothing calls this directly

Calls 3

add_catalogMethod · 0.95
StepCatalogClass · 0.90
read_textMethod · 0.80

Tested by

no test coverage detected