generated from coulomb/repo-seed
scope refactoring
This commit is contained in:
@@ -134,3 +134,23 @@ class TestRepoDispatchScopeHealth:
|
||||
"C5b": "pass",
|
||||
"C5c": "pass",
|
||||
}
|
||||
|
||||
async def test_scope_health_list_filters_reachable_repos_needing_review(self, client, tmp_path):
|
||||
await _create_domain(client)
|
||||
stub_path = tmp_path / "stub"
|
||||
valid_path = tmp_path / "valid"
|
||||
stub_path.mkdir()
|
||||
valid_path.mkdir()
|
||||
(stub_path / "SCOPE.md").write_text("# SCOPE\n", encoding="utf-8")
|
||||
(valid_path / "SCOPE.md").write_text(VALID_SCOPE, encoding="utf-8")
|
||||
await _create_repo(client, "scopedom", stub_path, slug="stub-list")
|
||||
await _create_repo(client, "scopedom", valid_path, slug="valid-list")
|
||||
|
||||
r = await client.get("/repos/scope-health?needs_review=true&reachable_only=true")
|
||||
assert r.status_code == 200, r.text
|
||||
body = r.json()
|
||||
|
||||
assert [entry["repo_slug"] for entry in body] == ["stub-list"]
|
||||
assert body[0]["path_available"] is True
|
||||
by_id = {issue["id"]: issue for issue in body[0]["scope_issue_details"]}
|
||||
assert by_id["C5b"]["needs_refresh_sections"]
|
||||
|
||||
Reference in New Issue
Block a user