This PR enhances the testing infrastructure by using a client fixture (see #96) that simulates the behavior of a real client. Additionally, we've addressed an incompatibility issue with this change. Key modifications in this PR include:
Implementation of the client fixture for more realistic testing without invoking the real client, or relying on mocks.
Refactoring of AlarmDevice.update() to leverage the new API. While initial tests passed, there were undetected operational issues that are now resolved.
AlarmDevice methods now log errors.
Breaking Change: The AlarmDevice.connect() method no longer invokes update(). This change streamlines the method's responsibility and simplifies the testing process, even though it initially appeared to be a beneficial shortcut.
Testing:
n/a
Extra Notes (optional):
This change is a breaking change and requires to update the HA integration.
Checklist
[x] Related issues and proposed changes are filled
[x] Tests are defining the correct and expected behavior
Related Issues
None.
Proposed Changes:
This PR enhances the testing infrastructure by using a
client
fixture (see #96) that simulates the behavior of a real client. Additionally, we've addressed an incompatibility issue with this change. Key modifications in this PR include:client
fixture for more realistic testing without invoking the real client, or relying on mocks.AlarmDevice.update()
to leverage the new API. While initial tests passed, there were undetected operational issues that are now resolved.AlarmDevice
methods now log errors.AlarmDevice.connect()
method no longer invokesupdate()
. This change streamlines the method's responsibility and simplifies the testing process, even though it initially appeared to be a beneficial shortcut.Testing:
n/a
Extra Notes (optional):
This change is a breaking change and requires to update the HA integration.
Checklist