9b124deeea
- Rename project from decp.info to colibre across all codebase - Update domain from https://decp.info to https://colibre.fr - Update GitHub repo references to ColinMaudry/colibre - Rename deployment files: decpinfo-backup.* → colibre-backup.* - Update project configuration and documentation - Rename project assets: decp.info.png → colibre.png - Update environment variables and constants (DOMAIN_NAME, TOKEN_PREFIX, GITHUB_REPO, etc.) - Update URLs in all pages, tests, and configuration files - Keep DECP acronym in text (unchanged per requirements) - Add rebrand note to README.md Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
54 lines
1.5 KiB
Python
54 lines
1.5 KiB
Python
from src.roadmap import github
|
|
|
|
|
|
class _FakeResp:
|
|
def __init__(self, payload):
|
|
self._payload = payload
|
|
|
|
def raise_for_status(self):
|
|
pass
|
|
|
|
def json(self):
|
|
return self._payload
|
|
|
|
|
|
_ISSUES = [
|
|
{
|
|
"number": 10,
|
|
"title": "Feature en cours",
|
|
"html_url": "https://github.com/ColinMaudry/colibre/issues/10",
|
|
"labels": [{"name": "en cours"}],
|
|
},
|
|
{
|
|
"number": 20,
|
|
"title": "Feature au vote",
|
|
"html_url": "https://github.com/ColinMaudry/colibre/issues/20",
|
|
"labels": [{"name": "mis au vote"}],
|
|
},
|
|
{
|
|
"number": 30,
|
|
"title": "Issue sans label pertinent",
|
|
"html_url": "https://github.com/ColinMaudry/colibre/issues/30",
|
|
"labels": [{"name": "bug"}],
|
|
},
|
|
{
|
|
"number": 40,
|
|
"title": "Une PR déguisée en issue",
|
|
"html_url": "https://github.com/ColinMaudry/colibre/pull/40",
|
|
"labels": [{"name": "mis au vote"}],
|
|
"pull_request": {"url": "..."},
|
|
},
|
|
]
|
|
|
|
|
|
def test_fetch_roadmap_issues_filters_by_label(monkeypatch):
|
|
monkeypatch.setattr(github.httpx, "get", lambda *a, **k: _FakeResp(_ISSUES))
|
|
result = github.fetch_roadmap_issues.uncached()
|
|
assert [i["number"] for i in result["en_cours"]] == [10]
|
|
assert [i["number"] for i in result["au_vote"]] == [20] # PR #40 exclue
|
|
assert result["en_cours"][0] == {
|
|
"number": 10,
|
|
"title": "Feature en cours",
|
|
"html_url": "https://github.com/ColinMaudry/colibre/issues/10",
|
|
}
|