Files
ajp_anton 8ec3cde4f2
Build custom container images / build (map[base_image:php:8-fpm-alpine build_args:PHP_VERSION=8 context:php8-pgsql fingerprint_command:{ apk info -v | LC_ALL=C sort; find /usr/local/lib/php/extensions /usr/local/etc/php/conf.d -type f -exec sha256sum {} + | LC_ALL=C sort; } name:ph… (push) Successful in 48s
Build custom container images / build (map[base_image:postgres:18 build_args:PG_VERSION=18 POSTGIS_VERSION=3 VCHORD_VERSION=0.5.3 context:postgres fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; find /usr/lib/postgresql -type f -exec sha256su… (push) Successful in 55s
Build custom container images / build (map[base_image:python:3 build_args:PYTHON_VERSION=3 context:python-tools fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; pip freeze | LC_ALL=C sort; } name:python-tools oci_labels:org.opencontainers.ima… (push) Successful in 54s
Build custom container images / build (map[base_image:python:3.12-slim build_args:PYTHON_VERSION=3.12-slim context:linkki-tiedotus fingerprint_command:{ dpkg-query -W -f='${binary:Package}=${Version}\n' | LC_ALL=C sort; pip freeze | LC_ALL=C sort; } name:linkki-tiedotus oci_labels:… (push) Successful in 39s
Add Linkki broadcast image
2026-08-19 20:51:26 +00:00

26 lines
936 B
Python

from pathlib import Path
from linkki_poster.models import Language, LanguageAssets
from linkki_poster.ordering import parse_order_input, prompt_language_order
def test_parse_order_input_accepts_expected_formats() -> None:
assert parse_order_input("12", 2) == [1, 2]
assert parse_order_input("2 1", 2) == [2, 1]
assert parse_order_input("1,2", 2) == [1, 2]
def test_parse_order_input_rejects_invalid_orders() -> None:
assert parse_order_input("11", 2) is None
assert parse_order_input("13", 2) is None
assert parse_order_input("1", 2) is None
def test_prompt_language_order_accepts_empty_as_default(tmp_path: Path) -> None:
fi = LanguageAssets(Language.FI, tmp_path / "fi.md", "fi", [])
en = LanguageAssets(Language.EN, tmp_path / "en.md", "en", [])
ordered = prompt_language_order([fi, en], input_fn=lambda _: "")
assert [item.language for item in ordered] == [Language.FI, Language.EN]