# Path: hotness/exceptions/http_exception.py
# class HTTPException(BaseHotnessException):
#     """
#     Class representing HTTP exception. This exception should be returned by any wrapper receiving
#     HTTP response when the error code is not 200.
# 
#     Attributes:
#         error_code: Error code of the response
#         message: Error message.
#     """
# 
#     def __init__(self, error_code: int, message: str):
#         """
#         Class constructor.
#         """
#         self.error_code = error_code
#         self.message = message
#         super(HTTPException, self).__init__(self.message)
# 
#     def __str__(self):
#         """
#         String representation of error.
#         """
#         return f"Error code: {self.error_code}\n" f"Error message: {self.message}"


import pytest
from hotness.exceptions import HTTPException



class TestHTTPExceptionInit:
    """
    Test class for `hotness.exceptions.HTTPException.__init__` method.
    """

    def test_init(self):
        """
        Assert that exception is created correctly.
        """
        exception = HTTPException(500, "This error is a tech heresy!")

        with pytest.raises(Exception):
            raise exception

        assert exception.error_code == 500
        assert exception.message == "This error is a tech heresy!"


class TestHTTPExceptionStr:
    """
    Test class for `hotness.exceptions.HTTPException.__str__` method.
    """

    def test_str(self):
        """
        Assert that the string representation of exception is correct.
        """

# Path: hotness/exceptions/http_exception.py
# class HTTPException(BaseHotnessException):
#     """
#     Class representing HTTP exception. This exception should be returned by any wrapper receiving
#     HTTP response when the error code is not 200.
# 
#     Attributes:
#         error_code: Error code of the response
#         message: Error message.
#     """
# 
#     def __init__(self, error_code: int, message: str):
#         """
#         Class constructor.
#         """
#         self.error_code = error_code
#         self.message = message
#         super(HTTPException, self).__init__(self.message)
# 
#     def __str__(self):
#         """
#         String representation of error.
#         """
#         return f"Error code: {self.error_code}\n" f"Error message: {self.message}"


# Path: tests/exceptions/test_http_exception.py
import pytest
from hotness.exceptions import HTTPException




class TestHTTPExceptionInit:
    """
    Test class for `hotness.exceptions.HTTPException.__init__` method.
    """

    def test_init(self):
        """
        Assert that exception is created correctly.
        """
        exception = HTTPException(500, "This error is a tech heresy!")

        with pytest.raises(Exception):
            raise exception

        assert exception.error_code == 500
        assert exception.message == "This error is a tech heresy!"


class TestHTTPExceptionStr:
    """
    Test class for `hotness.exceptions.HTTPException.__str__` method.
    """

    def test_str(self):
        """
        Assert that the string representation of exception is correct.
        """

        exception = HTTPException(500, "This error is a tech heresy!")