def METHOD_NAME(self, monkeypatch):
    def _mock_updates(states):
        monkeypatch.setattr(nominatim.tools.replication, 'update',
                        lambda *args, **kwargs: states.pop())
    self.update_states = _mock_updates