+ assert self.run_nominatim() == 0
+
+ assert self.mock_run_api.called == 1
+ assert self.mock_run_api.last_args[0] == params[0]
+
+
+ def test_bad_project_dir(self):
+ assert self.run_nominatim() == 1
+
+
+class TestCliStatusCall:
+
+ @pytest.fixture(autouse=True)
+ def setup_status_mock(self, monkeypatch):
+ monkeypatch.setattr(nominatim.api.NominatimAPI, 'status',
+ lambda self: StatusResult(200, 'OK'))
+
+
+ def test_status_simple(self, cli_call, tmp_path):
+ result = cli_call('status', '--project-dir', str(tmp_path))
+
+ assert result == 0
+