forked from home-assistant/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use snapshot assertion in rainforest_raven diagnostic tests (home-ass…
- Loading branch information
Showing
3 changed files
with
126 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
tests/components/rainforest_raven/snapshots/test_diagnostics.ambr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# serializer version: 1 | ||
# name: test_entry_diagnostics | ||
dict({ | ||
'config_entry': dict({ | ||
'data': dict({ | ||
'device': '/dev/ttyACM0', | ||
'mac': '**REDACTED**', | ||
}), | ||
'disabled_by': None, | ||
'discovery_keys': dict({ | ||
}), | ||
'domain': 'rainforest_raven', | ||
'entry_id': '01JADXBJSPYEBAFPKGXDJWZBQ8', | ||
'minor_version': 1, | ||
'options': dict({ | ||
}), | ||
'pref_disable_new_entities': False, | ||
'pref_disable_polling': False, | ||
'source': 'user', | ||
'title': 'Mock Title', | ||
'unique_id': None, | ||
'version': 1, | ||
}), | ||
'data': dict({ | ||
'Meters': dict({ | ||
'**REDACTED0**': dict({ | ||
'CurrentSummationDelivered': dict({ | ||
'device_mac_id': '**REDACTED**', | ||
'meter_mac_id': '**REDACTED**', | ||
'summation_delivered': '23456.7890', | ||
'summation_received': '00000.0000', | ||
'time_stamp': None, | ||
}), | ||
'InstantaneousDemand': dict({ | ||
'demand': '1.2345', | ||
'device_mac_id': '**REDACTED**', | ||
'meter_mac_id': '**REDACTED**', | ||
'time_stamp': None, | ||
}), | ||
'PriceCluster': dict({ | ||
'currency': dict({ | ||
'__type': "<enum 'Currency'>", | ||
'repr': "<Currency.USD: 'USD'>", | ||
}), | ||
'device_mac_id': '**REDACTED**', | ||
'meter_mac_id': '**REDACTED**', | ||
'price': '0.10', | ||
'rate_label': 'Set by user', | ||
'tier': 3, | ||
'tier_label': 'Set by user', | ||
'time_stamp': None, | ||
}), | ||
}), | ||
}), | ||
'NetworkInfo': dict({ | ||
'channel': 13, | ||
'coord_mac_id': None, | ||
'description': None, | ||
'device_mac_id': '**REDACTED**', | ||
'ext_pan_id': None, | ||
'link_strength': 100, | ||
'short_addr': None, | ||
'status': None, | ||
'status_code': None, | ||
}), | ||
}), | ||
}) | ||
# --- | ||
# name: test_entry_diagnostics_no_meters | ||
dict({ | ||
'config_entry': dict({ | ||
'data': dict({ | ||
'device': '/dev/ttyACM0', | ||
'mac': '**REDACTED**', | ||
}), | ||
'disabled_by': None, | ||
'discovery_keys': dict({ | ||
}), | ||
'domain': 'rainforest_raven', | ||
'entry_id': '01JADXBJSPYEBAFPKGXDJWZBQ8', | ||
'minor_version': 1, | ||
'options': dict({ | ||
}), | ||
'pref_disable_new_entities': False, | ||
'pref_disable_polling': False, | ||
'source': 'user', | ||
'title': 'Mock Title', | ||
'unique_id': None, | ||
'version': 1, | ||
}), | ||
'data': dict({ | ||
'Meters': dict({ | ||
}), | ||
'NetworkInfo': dict({ | ||
'channel': 13, | ||
'coord_mac_id': None, | ||
'description': None, | ||
'device_mac_id': '**REDACTED**', | ||
'ext_pan_id': None, | ||
'link_strength': 100, | ||
'short_addr': None, | ||
'status': None, | ||
'status_code': None, | ||
}), | ||
}), | ||
}) | ||
# --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters