@pytest.fixture
def index_mock(monkeypatch, tokenizer_mock, init_status):
mock = MockParamCapture()
- monkeypatch.setattr(nominatim.indexer.indexer.Indexer, 'index_boundaries', mock)
- monkeypatch.setattr(nominatim.indexer.indexer.Indexer, 'index_by_rank', mock)
+ monkeypatch.setattr(nominatim.indexer.indexer.Indexer, 'index_full', mock)
return mock
with pytest.raises(IndexError):
self.call_nominatim()
- assert index_mock.called == 4
+ assert index_mock.called == 2
def test_replication_update_continuous_no_change(self, monkeypatch, index_mock):
with pytest.raises(IndexError):
self.call_nominatim()
- assert index_mock.called == 2
+ assert index_mock.called == 1
assert sleep_mock.called == 1
assert sleep_mock.last_args[0] == 60