diff --git a/heidgaf_core/kafka_handler.py b/heidgaf_core/kafka_handler.py index 4b4292c..014ba5f 100644 --- a/heidgaf_core/kafka_handler.py +++ b/heidgaf_core/kafka_handler.py @@ -19,7 +19,6 @@ class KafkaMessageFetchException(Exception): pass -# TODO: Test class KafkaHandler: def __init__(self): self.consumer = None @@ -32,6 +31,7 @@ def __init__(self): ) +# TODO: Test class KafkaProduceHandler(KafkaHandler): def __init__(self): super().__init__() diff --git a/tests/test_kafka_handler.py b/tests/test_kafka_handler.py new file mode 100644 index 0000000..53e6401 --- /dev/null +++ b/tests/test_kafka_handler.py @@ -0,0 +1,16 @@ +import unittest + +from heidgaf_core.kafka_handler import KafkaHandler + + +class TestInit(unittest.TestCase): + def test_init(self): + handler_instance = KafkaHandler() + + self.assertIsNone(handler_instance.consumer) + self.assertEqual("localhost:9092,localhost:9093,localhost:9094", + handler_instance.brokers) + + +if __name__ == '__main__': + unittest.main()