mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 01:07:10 +00:00
Add coverage
This commit is contained in:
parent
32104b7b15
commit
b23e8b1c44
@ -16,6 +16,8 @@
|
|||||||
'verify_ssl': True,
|
'verify_ssl': True,
|
||||||
}),
|
}),
|
||||||
'auth': dict({
|
'auth': dict({
|
||||||
|
'password': 'pass',
|
||||||
|
'username': 'user',
|
||||||
}),
|
}),
|
||||||
'method': 'GET',
|
'method': 'GET',
|
||||||
'resource': 'http://www.home-assistant.io',
|
'resource': 'http://www.home-assistant.io',
|
||||||
@ -27,6 +29,7 @@
|
|||||||
dict({
|
dict({
|
||||||
'data': dict({
|
'data': dict({
|
||||||
'advanced': dict({
|
'advanced': dict({
|
||||||
|
'value_template': '{{ value }}',
|
||||||
}),
|
}),
|
||||||
'index': 0,
|
'index': 0,
|
||||||
'select': '.release-date',
|
'select': '.release-date',
|
||||||
|
@ -208,12 +208,15 @@ async def test_migrate_from_version_1_to_2(
|
|||||||
"encoding": "UTF-8",
|
"encoding": "UTF-8",
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"resource": "http://www.home-assistant.io",
|
"resource": "http://www.home-assistant.io",
|
||||||
|
"username": "user",
|
||||||
|
"password": "pass",
|
||||||
"sensor": [
|
"sensor": [
|
||||||
{
|
{
|
||||||
"index": 0,
|
"index": 0,
|
||||||
"name": "Current version",
|
"name": "Current version",
|
||||||
"select": ".release-date",
|
"select": ".release-date",
|
||||||
"unique_id": "a0bde946-5c96-11f0-b55f-0242ac110002",
|
"unique_id": "a0bde946-5c96-11f0-b55f-0242ac110002",
|
||||||
|
"value_template": "{{ value }}",
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"timeout": 10.0,
|
"timeout": 10.0,
|
||||||
@ -263,7 +266,7 @@ async def test_migrate_from_version_1_to_2(
|
|||||||
assert config_entry.subentries == {
|
assert config_entry.subentries == {
|
||||||
"01JZQ1G63X2DX66GZ9ZTFY9PEH": MockConfigSubentry(
|
"01JZQ1G63X2DX66GZ9ZTFY9PEH": MockConfigSubentry(
|
||||||
data={
|
data={
|
||||||
"advanced": {},
|
"advanced": {"value_template": "{{ value }}"},
|
||||||
"index": 0,
|
"index": 0,
|
||||||
"select": ".release-date",
|
"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_entry_id == config_entry.entry_id
|
||||||
assert entity.config_subentry_id == "01JZQ1G63X2DX66GZ9ZTFY9PEH"
|
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