aiohomematic-test-support 2026.1.8__tar.gz → 2026.1.27__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.
- {aiohomematic_test_support-2026.1.8/aiohomematic_test_support.egg-info → aiohomematic_test_support-2026.1.27}/PKG-INFO +1 -1
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/__init__.py +1 -1
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27/aiohomematic_test_support.egg-info}/PKG-INFO +1 -1
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/event_capture.py +6 -5
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/factory.py +15 -8
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/mock.py +10 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/MANIFEST.in +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/README.md +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/aiohomematic_test_support.egg-info/SOURCES.txt +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/aiohomematic_test_support.egg-info/dependency_links.txt +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/aiohomematic_test_support.egg-info/top_level.txt +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/const.py +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/data/device_translation.json +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/data/full_session_randomized_ccu.zip +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/data/full_session_randomized_pydevccu.zip +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/event_mock.py +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/helper.py +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/py.typed +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/pyproject.toml +0 -0
- {aiohomematic_test_support-2026.1.8 → aiohomematic_test_support-2026.1.27}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aiohomematic-test-support
|
|
3
|
-
Version: 2026.1.
|
|
3
|
+
Version: 2026.1.27
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aiohomematic-test-support
|
|
3
|
-
Version: 2026.1.
|
|
3
|
+
Version: 2026.1.27
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
|
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 =
|
|
122
|
-
|
|
123
|
-
async def _mocked_create_client(
|
|
124
|
-
|
|
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.
|
|
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,
|
|
@@ -191,6 +191,16 @@ def get_client_session( # noqa: C901
|
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
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
|
+
|
|
194
204
|
if method == _JsonRpcMethod.INTERFACE_SET_VALUE:
|
|
195
205
|
await self._central.event_coordinator.data_point_event(
|
|
196
206
|
interface_id=params[_JsonKey.INTERFACE],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|