Skip to content

Commit d848a3f

Browse files
committed
fix create_mocked_hub to work with relative hub
1 parent 14ade6f commit d848a3f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,5 @@ cython_debug/
193193
.cursorignore
194194
.cursorindexingignore
195195
.vscode/tasks.json
196+
197+
.github/mcp.json

custom_components/victron_mqtt/_vendor/victron_mqtt/testing/hub_helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ async def _async_noop(_self: Any) -> None:
7272
keepalive_patch.start()
7373

7474
try:
75-
with patch("victron_mqtt.hub.mqtt.Client") as mock_client:
75+
hub_module = Hub.__module__
76+
with patch(f"{hub_module}.mqtt.Client") as mock_client:
7677
hub = Hub(
7778
host="localhost",
7879
port=1883,

0 commit comments

Comments
 (0)