X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4cb6dc01f382e9fb748efbe4517442af2274f210..0d567291d668dcb912375d0e8ec779525c7c0bba:/test/python/test_tools_replication.py diff --git a/test/python/test_tools_replication.py b/test/python/test_tools_replication.py index b94563ff..156385ad 100644 --- a/test/python/test_tools_replication.py +++ b/test/python/test_tools_replication.py @@ -9,6 +9,7 @@ from osmium.replication.server import OsmosisState import nominatim.tools.replication import nominatim.db.status as status +from nominatim.errors import UsageError OSM_NODE_DATA = """\ @@ -24,7 +25,7 @@ def test_init_replication_bad_base_url(monkeypatch, status_table, place_row, tem monkeypatch.setattr(nominatim.db.status, "get_url", lambda u : OSM_NODE_DATA) - with pytest.raises(RuntimeError, match="Failed to reach replication service"): + with pytest.raises(UsageError, match="Failed to reach replication service"): nominatim.tools.replication.init_replication(temp_db_conn, 'https://test.io') @@ -90,7 +91,7 @@ def update_options(tmpdir): max_diff_size=1) def test_update_empty_status_table(status_table, temp_db_conn): - with pytest.raises(RuntimeError): + with pytest.raises(UsageError): nominatim.tools.replication.update(temp_db_conn, {})