aiohomematic-test-support 2026.1.4__tar.gz → 2026.1.26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {aiohomematic_test_support-2026.1.4/aiohomematic_test_support.egg-info → aiohomematic_test_support-2026.1.26}/PKG-INFO +1 -1
  2. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/__init__.py +1 -1
  3. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26/aiohomematic_test_support.egg-info}/PKG-INFO +1 -1
  4. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/event_capture.py +6 -5
  5. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/factory.py +15 -8
  6. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/mock.py +14 -3
  7. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/MANIFEST.in +0 -0
  8. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/README.md +0 -0
  9. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/aiohomematic_test_support.egg-info/SOURCES.txt +0 -0
  10. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/aiohomematic_test_support.egg-info/dependency_links.txt +0 -0
  11. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/aiohomematic_test_support.egg-info/top_level.txt +0 -0
  12. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/const.py +0 -0
  13. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/data/device_translation.json +0 -0
  14. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/data/full_session_randomized_ccu.zip +0 -0
  15. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/data/full_session_randomized_pydevccu.zip +0 -0
  16. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/event_mock.py +0 -0
  17. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/helper.py +0 -0
  18. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/py.typed +0 -0
  19. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/pyproject.toml +0 -0
  20. {aiohomematic_test_support-2026.1.4 → aiohomematic_test_support-2026.1.26}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiohomematic-test-support
3
- Version: 2026.1.4
3
+ Version: 2026.1.26
4
4
  Summary: Support-only package for AioHomematic (tests/dev). Not part of production builds.
5
5
  Author-email: SukramJ <sukramj@icloud.com>, Daniel Perna <danielperna84@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/SukramJ/aiohomematic
@@ -76,4 +76,4 @@ test dependencies to access test support functionality.
76
76
 
77
77
  from __future__ import annotations
78
78
 
79
- __version__ = "2026.1.4"
79
+ __version__ = "2026.1.26"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiohomematic-test-support
3
- Version: 2026.1.4
3
+ Version: 2026.1.26
4
4
  Summary: Support-only package for AioHomematic (tests/dev). Not part of production builds.
5
5
  Author-email: SukramJ <sukramj@icloud.com>, Daniel Perna <danielperna84@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/SukramJ/aiohomematic
@@ -152,12 +152,13 @@ class EventCapture:
152
152
 
153
153
  """
154
154
  for event_type in event_types:
155
- unsubscribe = event_bus.subscribe(
156
- event_type=event_type,
157
- event_key=None,
158
- handler=self._capture_handler,
155
+ self._unsubscribers.append(
156
+ event_bus.subscribe(
157
+ event_type=event_type,
158
+ event_key=None,
159
+ handler=self._capture_handler,
160
+ )
159
161
  )
160
- self._unsubscribers.append(unsubscribe)
161
162
 
162
163
  def _capture_handler(self, *, event: Event) -> None:
163
164
  """Handle event by capturing it."""
@@ -50,7 +50,7 @@ from aiohomematic.central.events import (
50
50
  DeviceTriggerEvent,
51
51
  SystemStatusChangedEvent,
52
52
  )
53
- from aiohomematic.client import ClientConfig, InterfaceConfig
53
+ from aiohomematic.client import InterfaceConfig, create_client as create_client_func
54
54
  from aiohomematic.const import LOCAL_HOST, Interface, OptionalSettings
55
55
  from aiohomematic.interfaces import ClientProtocol
56
56
  from aiohomematic_test_support import const
@@ -118,10 +118,17 @@ class FactoryWithClient:
118
118
 
119
119
  # Optionally patch client creation to return a mocked client
120
120
  if self._do_mock_client:
121
- _orig_create_client = ClientConfig.create_client
122
-
123
- async def _mocked_create_client(config: ClientConfig) -> ClientProtocol | Mock:
124
- real_client = await _orig_create_client(config)
121
+ _orig_create_client = create_client_func
122
+
123
+ async def _mocked_create_client(
124
+ *,
125
+ client_deps: Any,
126
+ interface_config: InterfaceConfig,
127
+ ) -> ClientProtocol | Mock:
128
+ real_client = await _orig_create_client(
129
+ client_deps=client_deps,
130
+ interface_config=interface_config,
131
+ )
125
132
  return cast(
126
133
  Mock,
127
134
  get_mock(
@@ -131,7 +138,7 @@ class FactoryWithClient:
131
138
  ),
132
139
  )
133
140
 
134
- p3 = patch("aiohomematic.client.ClientConfig.create_client", _mocked_create_client)
141
+ p3 = patch("aiohomematic.client.create_client", _mocked_create_client)
135
142
  p3.start()
136
143
  self._patches.append(p3)
137
144
 
@@ -144,7 +151,7 @@ class FactoryWithClient:
144
151
  async def get_raw_central(self) -> CentralUnit:
145
152
  """Return a central based on give address_device_translation."""
146
153
  interface_configs = self._interface_configs if self._interface_configs else set()
147
- central = CentralConfig(
154
+ central = await CentralConfig(
148
155
  name=const.CENTRAL_NAME,
149
156
  host=const.CCU_HOST,
150
157
  username=const.CCU_USERNAME,
@@ -295,7 +302,7 @@ async def get_pydev_ccu_central_unit_full(
295
302
  )
296
303
  }
297
304
 
298
- central = CentralConfig(
305
+ central = await CentralConfig(
299
306
  name=const.CENTRAL_NAME,
300
307
  host=const.CCU_HOST,
301
308
  username=const.CCU_USERNAME,
@@ -52,6 +52,7 @@ import zipfile
52
52
  from aiohttp import ClientSession
53
53
  import orjson
54
54
 
55
+ from aiohomematic.async_support import Looper
55
56
  from aiohomematic.central import CentralUnit
56
57
  from aiohomematic.client import BaseRpcProxy, CircuitBreaker
57
58
  from aiohomematic.client.json_rpc import _JsonKey, _JsonRpcMethod
@@ -190,6 +191,16 @@ def get_client_session( # noqa: C901
190
191
  }
191
192
  )
192
193
 
194
+ if "fetch_all_device_data" in params[_JsonKey.SCRIPT]:
195
+ # Return empty device data dict for InterfaceClient
196
+ return _MockResponse(
197
+ json_data={
198
+ _JsonKey.ID: 0,
199
+ _JsonKey.RESULT: {},
200
+ _JsonKey.ERROR: None,
201
+ }
202
+ )
203
+
193
204
  if method == _JsonRpcMethod.INTERFACE_SET_VALUE:
194
205
  await self._central.event_coordinator.data_point_event(
195
206
  interface_id=params[_JsonKey.INTERFACE],
@@ -275,7 +286,7 @@ def get_xml_rpc_proxy( # noqa: C901
275
286
  self._supported_methods: tuple[str, ...] = ()
276
287
  self._central: CentralUnit | None = None
277
288
  # Real CircuitBreaker to provide actual metrics for tests
278
- self._circuit_breaker = CircuitBreaker(interface_id="mock-interface")
289
+ self._circuit_breaker = CircuitBreaker(interface_id="mock-interface", task_scheduler=Looper())
279
290
 
280
291
  def __getattr__(self, name: str) -> Any:
281
292
  # Start of method chain
@@ -333,11 +344,11 @@ def get_xml_rpc_proxy( # noqa: C901
333
344
 
334
345
  for dd in devices:
335
346
  if ignore_devices_on_create is not None and (
336
- dd["ADDRESS"] in ignore_devices_on_create or dd["PARENT"] in ignore_devices_on_create
347
+ dd["ADDRESS"] in ignore_devices_on_create or dd.get("PARENT") in ignore_devices_on_create
337
348
  ):
338
349
  continue
339
350
  if address_device_translation is not None:
340
- if dd["ADDRESS"] in address_device_translation or dd["PARENT"] in address_device_translation:
351
+ if dd["ADDRESS"] in address_device_translation or dd.get("PARENT") in address_device_translation:
341
352
  new_devices.append(dd)
342
353
  else:
343
354
  new_devices.append(dd)