Skip to content

Commit

Permalink
Restructure test fixtures and use paramterize to use them (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
DCSBL authored Jan 29, 2024
1 parent 3d7e7cf commit c81bddd
Show file tree
Hide file tree
Showing 33 changed files with 492 additions and 265 deletions.
Binary file modified .coverage
Binary file not shown.
97 changes: 97 additions & 0 deletions tests/__snapshots__/test_homewizard_energy.ambr

Large diffs are not rendered by default.

69 changes: 42 additions & 27 deletions tests/__snapshots__/test_models.ambr

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/fixtures/HWE-SKT/identify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"identify": "ok"}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"power_on": false,
"switch_lock": false,
"brightness": 255
}
}
3 changes: 3 additions & 0 deletions tests/fixtures/HWE-SKT/state_brightness.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"brightness": 255
}
3 changes: 3 additions & 0 deletions tests/fixtures/HWE-SKT/state_power_on.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"power_on": false
}
3 changes: 3 additions & 0 deletions tests/fixtures/HWE-SKT/state_switch_lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"switch_lock": false
}
3 changes: 3 additions & 0 deletions tests/fixtures/HWE-SKT/system.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cloud_enabled": true
}
File renamed without changes.
7 changes: 7 additions & 0 deletions tests/fixtures/HWE-WTR/device.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"product_type": "HWE-WTR",
"product_name": "Water Meter",
"serial": "3c39e7aabbcc",
"firmware_version": "2.11",
"api_version": "v1"
}
File renamed without changes.
7 changes: 7 additions & 0 deletions tests/fixtures/SDM230-wifi/device.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"product_type": "SDM230-wifi",
"product_name": "kWh Meter",
"serial": "3c39e7aabbcc",
"firmware_version": "2.11",
"api_version": "v1"
}
3 changes: 3 additions & 0 deletions tests/fixtures/SDM230-wifi/system.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cloud_enabled": true
}
File renamed without changes.
7 changes: 7 additions & 0 deletions tests/fixtures/SDM630-wifi/device.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"product_type": "SDM630-wifi",
"product_name": "kWh Meter 3-phase",
"serial": "3c39e7aabbcc",
"firmware_version": "2.11",
"api_version": "v1"
}
3 changes: 3 additions & 0 deletions tests/fixtures/SDM630-wifi/system.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cloud_enabled": true
}
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions tests/fixtures/state_switch_lock_and_brightness.json

This file was deleted.

3 changes: 0 additions & 3 deletions tests/fixtures/system_cloud_disabled.json

This file was deleted.

Loading

0 comments on commit c81bddd

Please sign in to comment.