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

Method test_add_catalog

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

Source from the content-addressed store, hash-verified

4378 catalog._validate_catalog_url("http://localhost:8080/catalog.json")
4379
4380 def test_add_catalog(self, project_dir):
4381 from specify_cli.workflows.catalog import WorkflowCatalog
4382
4383 catalog = WorkflowCatalog(project_dir)
4384 catalog.add_catalog("https://example.com/new-catalog.json", "my-catalog")
4385
4386 config_path = project_dir / ".specify" / "workflow-catalogs.yml"
4387 assert config_path.exists()
4388 data = yaml.safe_load(config_path.read_text())
4389 assert len(data["catalogs"]) == 1
4390 assert data["catalogs"][0]["url"] == "https://example.com/new-catalog.json"
4391
4392 def test_add_catalog_duplicate_rejected(self, project_dir):
4393 from specify_cli.workflows.catalog import WorkflowCatalog, WorkflowValidationError

Callers

nothing calls this directly

Calls 3

add_catalogMethod · 0.95
WorkflowCatalogClass · 0.90
read_textMethod · 0.80

Tested by

no test coverage detected