Skip to content
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

Add tests for number of devices created in myuplink #111816

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion tests/components/myuplink/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def load_systems_jv_file(load_systems_file: str) -> dict[str, Any]:
@pytest.fixture(scope="session")
def load_systems_file() -> str:
"""Load fixture file for systems."""
return load_fixture("systems.json", DOMAIN)
return load_fixture("systems-2dev.json", DOMAIN)


@pytest.fixture
Expand Down
40 changes: 40 additions & 0 deletions tests/components/myuplink/fixtures/device-2dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"id": "robin-r-1234-20240201-123456-aa-bb-cc-dd-ee-ff",
"connectionState": "Connected",
"firmware": {
"currentFwVersion": "9682R7",
"desiredFwVersion": "9682R7"
},
"product": {
"serialNumber": "222222",
"name": "F730 CU 3x400V"
},
"availableFeatures": {
"settings": true,
"reboot": true,
"forcesync": true,
"forceUpdate": false,
"requestUpdate": false,
"resetAlarm": true,
"triggerEvent": true,
"getMenu": false,
"getMenuChain": false,
"getGuideQuestion": false,
"sendHaystack": true,
"setSmartMode": false,
"setAidMode": true,
"getZones": false,
"processIntent": false,
"boostHotWater": true,
"boostVentilation": true,
"getScheduleConfig": false,
"getScheduleModes": false,
"getScheduleWeekly": false,
"getScheduleVacation": false,
"setScheduleModes": false,
"setScheduleWeekly": false,
"setScheduleOverride": false,
"setScheduleVacation": false,
"setVentilationMode": false
}
}
34 changes: 34 additions & 0 deletions tests/components/myuplink/fixtures/systems-2dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"page": 1,
"itemsPerPage": 10,
"numItems": 1,
"systems": [
{
"systemId": "123456-7890-1234",
"name": "Gotham City",
"securityLevel": "admin",
"hasAlarm": false,
"country": "Sweden",
"devices": [
{
"id": "robin-r-1234-20240201-123456-aa-bb-cc-dd-ee-ff",
"connectionState": "Connected",
"currentFwVersion": "9682R7",
"product": {
"serialNumber": "222222",
"name": "F730 CU 3x400V"
}
},
{
"id": "batman-r-1234-20240201-123456-aa-bb-cc-dd-ee-ff",
"connectionState": "Connected",
"currentFwVersion": "9682R7",
"product": {
"serialNumber": "123456",
"name": "F730 CU 3x400V"
}
}
]
}
]
}
Loading
Loading