palazzem / ha-econnect-alarm

Home Assistant integration that provides a full-fledged Alarm Panel to control your Elmo/IESS alarm systems.
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

GitHub actions don't work as `socket.socket` is accessed #103

Closed palazzem closed 7 months ago

palazzem commented 7 months ago

Describe the bug

GitHub actions don't pass anymore as it looks like a default is changed. By accessing socket.socket in responses, pytest-socket is configured with --disable-socket triggering an exception and failing all tests that are using ElmoClient fixture.

Error message

cls = <class 'pytest_socket.disable_socket.<locals>.GuardedSocket'>
family = <AddressFamily.AF_INET: 2>, type = <SocketKind.SOCK_STREAM: 1>
proto = -1, fileno = None

    def __new__(cls, family=-1, type=-1, proto=-1, fileno=None):
        if _is_unix_socket(family) and allow_unix_socket:
            return super().__new__(cls, family, type, proto, fileno)

>       raise SocketBlockedError()
E       pytest_socket.SocketBlockedError: A test tried to use socket.socket.

Expected behavior

It should work as before.

Additional context

n/a

To Reproduce

Just open any PR.

Environment

palazzem commented 7 months ago

Reproduction si available in this empty PR: https://github.com/palazzem/ha-econnect-alarm/actions/runs/6746464503/job/18340443342?pr=104