mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 00:27:19 +00:00
Add coverage
This commit is contained in:
parent
32104b7b15
commit
b23e8b1c44
@ -16,6 +16,8 @@
|
||||
'verify_ssl': True,
|
||||
}),
|
||||
'auth': dict({
|
||||
'password': 'pass',
|
||||
'username': 'user',
|
||||
}),
|
||||
'method': 'GET',
|
||||
'resource': 'http://www.home-assistant.io',
|
||||
@ -27,6 +29,7 @@
|
||||
dict({
|
||||
'data': dict({
|
||||
'advanced': dict({
|
||||
'value_template': '{{ value }}',
|
||||
}),
|
||||
'index': 0,
|
||||
'select': '.release-date',
|
||||
|
@ -208,12 +208,15 @@ async def test_migrate_from_version_1_to_2(
|
||||
"encoding": "UTF-8",
|
||||
"method": "GET",
|
||||
"resource": "http://www.home-assistant.io",
|
||||
"username": "user",
|
||||
"password": "pass",
|
||||
"sensor": [
|
||||
{
|
||||
"index": 0,
|
||||
"name": "Current version",
|
||||
"select": ".release-date",
|
||||
"unique_id": "a0bde946-5c96-11f0-b55f-0242ac110002",
|
||||
"value_template": "{{ value }}",
|
||||
}
|
||||
],
|
||||
"timeout": 10.0,
|
||||
@ -263,7 +266,7 @@ async def test_migrate_from_version_1_to_2(
|
||||
assert config_entry.subentries == {
|
||||
"01JZQ1G63X2DX66GZ9ZTFY9PEH": MockConfigSubentry(
|
||||
data={
|
||||
"advanced": {},
|
||||
"advanced": {"value_template": "{{ value }}"},
|
||||
"index": 0,
|
||||
"select": ".release-date",
|
||||
},
|
||||
@ -281,3 +284,6 @@ async def test_migrate_from_version_1_to_2(
|
||||
}
|
||||
assert entity.config_entry_id == config_entry.entry_id
|
||||
assert entity.config_subentry_id == "01JZQ1G63X2DX66GZ9ZTFY9PEH"
|
||||
|
||||
state = hass.states.get("sensor.current_version")
|
||||
assert state.state == "January 17, 2022"
|
||||
|
Loading…
x
Reference in New Issue
Block a user