Why not just mock out the Kafka client in your tests and have it call a
function which yields a kafka message every call?

```
def consumer():
    for _ in range(99):

        yield KafkaMessage('key', 'value')mock_consumer =
mocker.patch.object(foo, 'consumer', consumer())

```

Is there any specific feature you're after?

Reply via email to