Skip to content

Commit e20911a

Browse files
committed
Add testcoverage for missing modules
1 parent 9a34c2d commit e20911a

File tree

3 files changed

+1066
-0
lines changed

3 files changed

+1066
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"devices": {
3+
"0466eae8520144c78afb29628384edeb": {
4+
"binary_sensors": {
5+
"plugwise_notification": false
6+
},
7+
"dev_class": "gateway",
8+
"firmware": "4.0.15",
9+
"hardware": "AME Smile 2.0 board",
10+
"location": "94c107dc6ac84ed98e9f68c0dd06bf71",
11+
"mac_address": "012345670001",
12+
"model": "Gateway",
13+
"model_id": "smile_thermo",
14+
"name": "Smile Anna",
15+
"notifications": {},
16+
"sensors": {
17+
"outdoor_temperature": 7.44
18+
},
19+
"vendor": "Plugwise"
20+
}
21+
}
22+
}

tests/test_anna.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,3 +546,24 @@ async def test_connect_anna_loria_driessens(self):
546546

547547
await api.close_connection()
548548
await self.disconnect(server, client)
549+
550+
@pytest.mark.asyncio
551+
async def test_connect_anna_v4_no_modules(self):
552+
"""Test an Anna v4 with removed Anna and OpenTherm device."""
553+
self.smile_setup = "anna_v4_no_modules"
554+
555+
testdata = await self.load_testdata(SMILE_TYPE, self.smile_setup)
556+
server, api, client = await self.connect_wrapper()
557+
assert api.smile.hostname == "smile000000"
558+
559+
self.validate_test_basics(
560+
_LOGGER,
561+
api,
562+
smile_version=None,
563+
)
564+
565+
await self.device_test(api, "2022-05-16 00:00:01", testdata)
566+
assert self.entity_items == 12
567+
568+
await api.close_connection()
569+
await self.disconnect(server, client)

0 commit comments

Comments
 (0)