mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 01:47:57 +00:00
Merge pull request #3960 from jayaddison/tests/has-pending-monkeypatch-robustness
Tests: parameter-agnostic 'Indexer.has_pending' monkeypatching
This commit is contained in:
@@ -91,8 +91,9 @@ class TestCliWithDb:
|
||||
postcode_mock = async_mock_func_factory(nominatim_db.indexer.indexer.Indexer,
|
||||
'index_postcodes')
|
||||
|
||||
has_pending_retvals = [True, False]
|
||||
monkeypatch.setattr(nominatim_db.indexer.indexer.Indexer, 'has_pending',
|
||||
[False, True].pop)
|
||||
lambda *args, **kwargs: has_pending_retvals.pop(0))
|
||||
|
||||
assert self.call_nominatim('index', *params) == 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user