generated from coulomb/repo-seed
Repo stats and features as aggregates
This commit is contained in:
@@ -1031,7 +1031,10 @@ def test_api_source_linked_candidate_and_repo_update_loop(tmp_path):
|
||||
for capability in ability["capabilities"]
|
||||
for feature in capability["features"]
|
||||
}
|
||||
assert {"GET /status", "GET /ready"} <= second_features
|
||||
assert any(
|
||||
"GET /status" in feature_name and "GET /ready" in feature_name
|
||||
for feature_name in second_features
|
||||
)
|
||||
|
||||
approved_after_reanalysis = client.get(f"/repos/{repository_id}/ability-map")
|
||||
assert approved_after_reanalysis.status_code == 200
|
||||
@@ -1060,6 +1063,13 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
" return {}\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
(source / "cli.py").write_text(
|
||||
"import click\n\n"
|
||||
"@click.command()\n"
|
||||
"def status():\n"
|
||||
" click.echo('ok')\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
def override_settings():
|
||||
return Settings(
|
||||
@@ -1095,6 +1105,7 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
assert detail_response.status_code == 200
|
||||
assert "Run Analysis" in detail_response.text
|
||||
assert "Running analysis..." in detail_response.text
|
||||
assert "Analyze cached checkout without fetching upstream" in detail_response.text
|
||||
assert "Repository Metadata" in detail_response.text
|
||||
|
||||
edit_repository_response = client.post(
|
||||
@@ -1127,6 +1138,10 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
run_detail = client.get(run_path)
|
||||
assert run_detail.status_code == 200
|
||||
assert "Candidate Graph" in run_detail.text
|
||||
assert "1 abilities" in run_detail.text
|
||||
assert "2 capabilities" in run_detail.text
|
||||
assert "2 features" in run_detail.text
|
||||
assert "7 facts" in run_detail.text
|
||||
assert "Content Chunks" in run_detail.text
|
||||
assert "README.md:1-1" in run_detail.text
|
||||
assert "ID " in run_detail.text
|
||||
@@ -1141,6 +1156,9 @@ def test_ui_register_analyze_and_approve_loop(tmp_path):
|
||||
approved_detail = client.get(approve_response.headers["location"])
|
||||
assert approved_detail.status_code == 200
|
||||
assert "Approved Ability Map" in approved_detail.text
|
||||
assert "1 abilities" in approved_detail.text
|
||||
assert "2 capabilities" in approved_detail.text
|
||||
assert "2 features" in approved_detail.text
|
||||
assert "Review UI Repo Edited Repository Usefulness" in approved_detail.text
|
||||
assert "Language: Python" in approved_detail.text
|
||||
assert "Framework: FastAPI" in approved_detail.text
|
||||
@@ -1635,7 +1653,6 @@ def test_api_rejects_candidate_capability_feature_and_evidence(tmp_path):
|
||||
" return {}\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
def override_settings():
|
||||
return Settings(
|
||||
database_path=str(tmp_path / "api-reject.sqlite3"),
|
||||
@@ -1723,7 +1740,6 @@ def test_api_relinks_candidate_feature_and_evidence(tmp_path):
|
||||
" return {}\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
def override_settings():
|
||||
return Settings(
|
||||
database_path=str(tmp_path / "api-relink.sqlite3"),
|
||||
@@ -1798,6 +1814,13 @@ def test_api_merges_candidate_capability_feature_and_evidence(tmp_path):
|
||||
" return {}\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
(source / "cli.py").write_text(
|
||||
"import click\n\n"
|
||||
"@click.command()\n"
|
||||
"def status_cli():\n"
|
||||
" click.echo('ok')\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
def override_settings():
|
||||
return Settings(
|
||||
|
||||
Reference in New Issue
Block a user