mockafka-py
mockafka-py copied to clipboard
TypeError: FakeAIOKafkaConsumer.commit() takes 1 positional argument but 2 were given
Describe the bug
The signature of mockafka.FakeAIOKafkaConsumer.commit() does not match the signature of aiokafka.AioKafkaConsumer.commit(), which takes a single, optional keyword argument offsets.
To Reproduce Steps to reproduce the behavior:
- Implement a test that calls the
commit()message of the Kafka consumer and passes the keyword argumentoffsets
Outcome
An exception is raised: TypeError: FakeAIOKafkaConsumer.commit() takes 1 positional argument but 2 were given
Expected behavior The test does not raise a TypeError.
Additional context Versions:
- aiokafka==0.10.0
- mockafka-py==0.2.2
Any chance we can get this MR reviewed? :)
Thanks for the interest. The associated PR may work, however it hasn't been compared to either the library or Kafka's internal behaviours yet -- hence it being in draft. Unfortunately I don't know when those could happen, though if you're familiar with the behaviour and wanted to check it over that could be a useful contribution :)