]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/test_config.py
improve deadlock detection for various versions of psycopg2
[nominatim.git] / test / python / test_config.py
index f9fefeb2215c900279a9bad81d22ecce35ff6a5c..4578be1379cfa680ba413db33ebfdfb95be1708c 100644 (file)
@@ -7,6 +7,7 @@ import tempfile
 import pytest
 
 from nominatim.config import Configuration
+from nominatim.errors import UsageError
 
 DEFCFG_DIR = Path(__file__) / '..' / '..' / '..' / 'settings'
 
@@ -123,7 +124,7 @@ def test_get_int_bad_values(monkeypatch, value):
 
     monkeypatch.setenv('NOMINATIM_FOOBAR', value)
 
-    with pytest.raises(ValueError):
+    with pytest.raises(UsageError):
         config.get_int('FOOBAR')
 
 
@@ -132,7 +133,7 @@ def test_get_int_empty():
 
     assert config.DATABASE_MODULE_PATH == ''
 
-    with pytest.raises(ValueError):
+    with pytest.raises(UsageError):
         config.get_int('DATABASE_MODULE_PATH')