]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/cli/test_cmd_api.py
add tests for new data invalidation functions
[nominatim.git] / test / python / cli / test_cmd_api.py
index f24125c2e80eaed3ba66524d030edf01533bf102..80248ac739359967c6690f6deb72dd53ec8bd55a 100644 (file)
@@ -14,15 +14,14 @@ import nominatim.clicmd.api
 
 @pytest.mark.parametrize("endpoint", (('search', 'reverse', 'lookup', 'details', 'status')))
 def test_no_api_without_phpcgi(src_dir, endpoint):
-    with pytest.raises(SystemExit):
-        nominatim.cli.nominatim(module_dir='MODULE NOT AVAILABLE',
-                                osm2pgsql_path='OSM2PGSQL NOT AVAILABLE',
-                                phplib_dir=str(src_dir / 'lib-php'),
-                                data_dir=str(src_dir / 'data'),
-                                phpcgi_path=None,
-                                sqllib_dir=str(src_dir / 'lib-sql'),
-                                config_dir=str(src_dir / 'settings'),
-                                cli_args=[endpoint])
+    assert nominatim.cli.nominatim(module_dir='MODULE NOT AVAILABLE',
+                                   osm2pgsql_path='OSM2PGSQL NOT AVAILABLE',
+                                   phplib_dir=str(src_dir / 'lib-php'),
+                                   data_dir=str(src_dir / 'data'),
+                                   phpcgi_path=None,
+                                   sqllib_dir=str(src_dir / 'lib-sql'),
+                                   config_dir=str(src_dir / 'settings'),
+                                   cli_args=[endpoint]) == 1
 
 
 @pytest.mark.parametrize("params", [('search', '--query', 'new'),