diff --git a/asu/api.py b/asu/api.py index bd6b9368..a7d18220 100644 --- a/asu/api.py +++ b/asu/api.py @@ -46,10 +46,7 @@ def get_latest() -> dict: lambda b: b["versions"][0], filter( lambda b: b.get("enabled"), - filter( - lambda b: not b.get("snapshot"), - current_app.config["BRANCHES"], - ), + current_app.config["BRANCHES"], ), ) ) diff --git a/tests/conftest.py b/tests/conftest.py index 021512c4..464d2f02 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -83,7 +83,7 @@ def app(redis): { "name": "19.07", "enabled": True, - "versions": ["19.07.6", "19.07.5"], + "versions": ["19.07.7", "19.07.6"], "git_branch": "openwrt-19.07", "path": "releases/{version}", "path_packages": "releases/packages-{branch}", diff --git a/tests/test_api.py b/tests/test_api.py index aa189377..0db9ebc3 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -24,7 +24,9 @@ def test_api_build(client): def test_api_latest_default(client): response = client.get("/api/latest") - assert response.json == {"latest": ["19.07.6"]} + assert "19.07.7" in response.json["latest"] + assert "21.02.0-rc1" in response.json["latest"] + assert "SNAPSHOT" in response.json["latest"] assert response.status == "200 OK"