Files
Spoolman/tests/test_update_check.py
Donkie 1a04139c1d Add update check against GitHub releases (#1192)
The server checks the latest GitHub release in the background at startup
and every 12h, logs a warning when a newer version exists, and exposes
latest_version/update_available on /info. The client_v2 footer shows a
link to the new release. Disable with SPOOLMAN_UPDATE_CHECK=FALSE.
2026-09-27 08:32:57 +02:00

15 lines
521 B
Python

"""Tests for the release version comparison used by the update check."""
from spoolman.update_check import is_newer
def test_is_newer() -> None:
assert is_newer("0.28.0", "0.27.0")
assert is_newer("v0.27.1", "0.27.0")
assert is_newer("1.0.0", "0.99.9")
assert is_newer("0.10.0", "0.9.0") # numeric, not string, compare
assert not is_newer("0.27.0", "0.27.0")
assert not is_newer("0.26.5", "0.27.0")
assert not is_newer("0.28.0", "unknown")
assert not is_newer("0.28.0-beta", "0.27.0")