# Path: kiel/exc.py
# class KielError(Exception):
# class NoBrokersError(KielError):
# class NoOffsetsError(KielError):
# class BrokerConnectionError(KielError):
# class UnhandledResponseError(KielError):
#     def __init__(self, host, port, broker_id=None):
#     def __str__(self):
#     def __init__(self, api):
#     def __str__(self):


import unittest
from kiel import exc



class ExceptionTests(unittest.TestCase):

    def test_broker_connection_error(self):
        e = exc.BrokerConnectionError("kafka01", 4455)

        self.assertEqual(e.host, "kafka01")
        self.assertEqual(e.port, 4455)

        self.assertEqual(str(e), "Error connecting to kafka01:4455")

    def test_broker_connection_error_with_broker_id(self):

# Path: kiel/exc.py
# class KielError(Exception):
# class NoBrokersError(KielError):
# class NoOffsetsError(KielError):
# class BrokerConnectionError(KielError):
# class UnhandledResponseError(KielError):
#     def __init__(self, host, port, broker_id=None):
#     def __str__(self):
#     def __init__(self, api):
#     def __str__(self):


# Path: tests/test_exc.py
import unittest
from kiel import exc




class ExceptionTests(unittest.TestCase):

    def test_broker_connection_error(self):
        e = exc.BrokerConnectionError("kafka01", 4455)

        self.assertEqual(e.host, "kafka01")
        self.assertEqual(e.port, 4455)

        self.assertEqual(str(e), "Error connecting to kafka01:4455")

    def test_broker_connection_error_with_broker_id(self):

        e = exc.BrokerConnectionError("kafka01", 4455, broker_id=8)