generated from coulomb/repo-seed
first usable curator UI
This commit is contained in:
@@ -66,6 +66,7 @@ def test_search_matches_approved_abilities_and_capabilities(tmp_path):
|
||||
repository = service.register_repository(
|
||||
name="MailRouter",
|
||||
url="https://example.com/mail-router.git",
|
||||
description="Manual test repository.",
|
||||
)
|
||||
ability_id = service.add_ability(
|
||||
repository.id,
|
||||
@@ -87,10 +88,34 @@ def test_search_matches_approved_abilities_and_capabilities(tmp_path):
|
||||
assert results[0].match_name == "Classify Incoming Email"
|
||||
|
||||
|
||||
def test_register_repository_imports_metadata_when_name_is_omitted(tmp_path):
|
||||
source = tmp_path / "metadata-source"
|
||||
source.mkdir()
|
||||
(source / "pyproject.toml").write_text(
|
||||
'[project]\nname = "metadata-source"\ndescription = "Imported description."\n',
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
service = make_service(tmp_path)
|
||||
|
||||
repository = service.register_repository(url=str(source))
|
||||
|
||||
assert repository.name == "metadata-source"
|
||||
assert repository.description == "Imported description."
|
||||
|
||||
|
||||
def test_capability_must_belong_to_repository(tmp_path):
|
||||
service = make_service(tmp_path)
|
||||
first = service.register_repository(name="First", url="https://example.com/first.git")
|
||||
second = service.register_repository(name="Second", url="https://example.com/second.git")
|
||||
first = service.register_repository(
|
||||
name="First",
|
||||
url="https://example.com/first.git",
|
||||
description="Manual first repository.",
|
||||
)
|
||||
second = service.register_repository(
|
||||
name="Second",
|
||||
url="https://example.com/second.git",
|
||||
description="Manual second repository.",
|
||||
)
|
||||
ability_id = service.add_ability(first.id, name="Document Classification")
|
||||
|
||||
try:
|
||||
@@ -186,6 +211,7 @@ def test_analyze_repository_failure_is_recorded(tmp_path):
|
||||
repository = service.register_repository(
|
||||
name="Missing",
|
||||
url=str(tmp_path / "does-not-exist"),
|
||||
description="Manual missing repository.",
|
||||
)
|
||||
|
||||
summary = service.analyze_repository(repository.id)
|
||||
|
||||
Reference in New Issue
Block a user