Closed 1Mark closed 2 years ago
My bad forbiddenfruit
patches attributes of a class and not an instance of a class.
I fixed this by doing
from confluent_kafka import Consumer
forbiddenfruit.curse(Consumer, "poll", MockKafkaMessage())
consumer = Consumer(...)
instead of
from confluent_kafka import Consumer
consumer = Consumer(...)
forbiddenfruit.curse(consumer, "poll", MockKafkaMessage())
I'm using 0.1.4 and get
when trying to mock https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html#confluent_kafka.Consumer.poll but im faced with this error
Where consumer is an instance of