3
3
from confluent_kafka import (Consumer , TopicPartition , KafkaError ,
4
4
KafkaException , TIMESTAMP_NOT_AVAILABLE ,
5
5
OFFSET_INVALID , libversion )
6
- from confluent_kafka .consumer import DeserializingConsumer
6
+ from confluent_kafka .consumer import SerializingConsumer
7
7
import pytest
8
8
9
9
@@ -325,13 +325,13 @@ def test_consumer_withot_groupid():
325
325
326
326
327
327
@pytest .mark .parametrize ("test_param" , [
328
- ({"key_deserializer" : lambda key : key }, DeserializingConsumer ),
329
- ({"value_deserializer" : lambda value : value }, DeserializingConsumer ),
328
+ ({"key_deserializer" : lambda key : key }, SerializingConsumer ),
329
+ ({"value_deserializer" : lambda value : value }, SerializingConsumer ),
330
330
({"key_deserializer" : lambda key : key ,
331
- "value_deserializer" : lambda value : value }, DeserializingConsumer ),
331
+ "value_deserializer" : lambda value : value }, SerializingConsumer ),
332
332
({}, Consumer )
333
333
])
334
- def test_producer_factory (test_param ):
334
+ def test_consumer_factory (test_param ):
335
335
"""
336
336
Assert Consumer factory returns the correct class
337
337
"""
@@ -340,10 +340,10 @@ def test_producer_factory(test_param):
340
340
assert (type (c ) is test_param [1 ])
341
341
342
342
343
- def test_deserializing_consumer_instantiation ():
343
+ def test_serializing_consumer_instantiation ():
344
344
"""
345
- Assert DeserializingConsumer instances cannot be created directly
345
+ Assert SerializingConsumer instances cannot be created directly
346
346
"""
347
347
with pytest .raises (TypeError ) as e :
348
- DeserializingConsumer ()
349
- assert 'DeserializingConsumer is a non user-instantiable class' in str (e )
348
+ SerializingConsumer ()
349
+ assert 'SerializingConsumer is a non user-instantiable class' in str (e )
0 commit comments