Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Include component_nego with child fixtures #858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion devtools/dump_devinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,14 @@ async def get_smart_test_calls(device: SmartDevice):

# Child component calls
for child_device_id, child_components in child_device_components.items():
test_calls.append(
SmartCall(
module="component_nego",
request=SmartRequest("component_nego"),
should_succeed=True,
child_device_id=child_device_id,
)
)
for component_id, ver_code in child_components.items():
if (requests := get_component_requests(component_id, ver_code)) is not None:
component_test_calls = [
Expand Down Expand Up @@ -621,7 +629,8 @@ async def get_smart_fixtures(device: SmartDevice, batch_size: int):
response["get_device_info"]["device_id"] = scrubbed
# If the child is a different model to the parent create a seperate fixture
if (
"get_device_info" in response
"component_nego" in response
and "get_device_info" in response
and (child_model := response["get_device_info"].get("model"))
and child_model != final["get_device_info"]["model"]
):
Expand Down