'Should reset to beginning of valid offsets on `OffsetOutOfRangeError`'

def test_out_of_range(self):

    def _seek(offset, whence):
        self.assertEqual(offset, 0)
        self.assertEqual(whence, 0)
        self.consumer.offsets = {self.partition: 100}
    with patch.object(self.consumer, 'seek', _seek):
        with self.context:
            raise OffsetOutOfRangeError()
    self.assertEqual(self.consumer.offsets, {self.partition: 100})
