X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9d31a6711605cd4ebea09ca1675e2549b706ba5b..38f467bae3d9a6128180367c0e46ffd0bcad0961:/test/python/api/test_api_status.py?ds=sidebyside diff --git a/test/python/api/test_api_status.py b/test/python/api/test_api_status.py index aae5055e..6bc1fccc 100644 --- a/test/python/api/test_api_status.py +++ b/test/python/api/test_api_status.py @@ -11,7 +11,7 @@ from pathlib import Path import datetime as dt import pytest -from nominatim.version import version_str +from nominatim.version import NOMINATIM_VERSION, NominatimVersion from nominatim.api import NominatimAPI def test_status_no_extra_info(apiobj, table_factory): @@ -24,7 +24,7 @@ def test_status_no_extra_info(apiobj, table_factory): assert result.status == 0 assert result.message == 'OK' - assert result.software_version == version_str() + assert result.software_version == NOMINATIM_VERSION assert result.database_version is None assert result.data_updated is None @@ -41,8 +41,8 @@ def test_status_full(apiobj, table_factory): assert result.status == 0 assert result.message == 'OK' - assert result.software_version == version_str() - assert result.database_version == '99.5.4-2' + assert result.software_version == NOMINATIM_VERSION + assert result.database_version == NominatimVersion(99, 5, 4, 2) assert result.data_updated == dt.datetime(2022, 12, 7, 14, 14, 46, 0, tzinfo=dt.timezone.utc) @@ -54,7 +54,7 @@ def test_status_database_not_found(monkeypatch): result = api.status() assert result.status == 700 - assert result.message == 'No database' - assert result.software_version == version_str() + assert result.message == 'Database connection failed' + assert result.software_version == NOMINATIM_VERSION assert result.database_version is None assert result.data_updated is None