mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 19:07:58 +00:00
enable flake for Python tests
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This file is part of Nominatim. (https://nominatim.org)
|
||||
#
|
||||
# Copyright (C) 2024 by the Nominatim developer community.
|
||||
# Copyright (C) 2025 by the Nominatim developer community.
|
||||
# For a full list of authors see the git log.
|
||||
"""
|
||||
Tests for database integrity checks.
|
||||
@@ -12,6 +12,7 @@ import pytest
|
||||
from nominatim_db.tools import check_database as chkdb
|
||||
import nominatim_db.version
|
||||
|
||||
|
||||
def test_check_database_unknown_db(def_config, monkeypatch):
|
||||
monkeypatch.setenv('NOMINATIM_DATABASE_DSN', 'pgsql:dbname=fjgkhughwgh2423gsags')
|
||||
assert chkdb.check_database(def_config) == 1
|
||||
@@ -35,6 +36,7 @@ def test_check_database_version_good(property_table, temp_db_conn, def_config):
|
||||
str(nominatim_db.version.NOMINATIM_VERSION))
|
||||
assert chkdb.check_database_version(temp_db_conn, def_config) == chkdb.CheckState.OK
|
||||
|
||||
|
||||
def test_check_database_version_bad(property_table, temp_db_conn, def_config):
|
||||
property_table.set('database_version', '3.9.9-9')
|
||||
assert chkdb.check_database_version(temp_db_conn, def_config) == chkdb.CheckState.FATAL
|
||||
|
||||
Reference in New Issue
Block a user