mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Update betamax casettes
This commit is contained in:
parent
831799a7af
commit
0525af920c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -25,7 +25,7 @@ class TestSensorYr:
|
||||
|
||||
def test_default_setup(self, betamax_session):
|
||||
"""Test the default setup."""
|
||||
now = datetime(2016, 1, 5, 1, tzinfo=dt_util.UTC)
|
||||
now = datetime(2016, 6, 9, 1, tzinfo=dt_util.UTC)
|
||||
|
||||
with patch('homeassistant.components.sensor.yr.requests.Session',
|
||||
return_value=betamax_session):
|
||||
@ -37,13 +37,13 @@ class TestSensorYr:
|
||||
|
||||
state = self.hass.states.get('sensor.yr_symbol')
|
||||
|
||||
assert '46' == state.state
|
||||
assert '3' == state.state
|
||||
assert state.state.isnumeric()
|
||||
assert state.attributes.get('unit_of_measurement') is None
|
||||
|
||||
def test_custom_setup(self, betamax_session):
|
||||
"""Test a custom setup."""
|
||||
now = datetime(2016, 1, 5, 1, tzinfo=dt_util.UTC)
|
||||
now = datetime(2016, 6, 9, 1, tzinfo=dt_util.UTC)
|
||||
|
||||
with patch('homeassistant.components.sensor.yr.requests.Session',
|
||||
return_value=betamax_session):
|
||||
@ -61,15 +61,15 @@ class TestSensorYr:
|
||||
|
||||
state = self.hass.states.get('sensor.yr_pressure')
|
||||
assert 'hPa' == state.attributes.get('unit_of_measurement')
|
||||
assert '1025.1' == state.state
|
||||
assert '1009.3' == state.state
|
||||
|
||||
state = self.hass.states.get('sensor.yr_wind_direction')
|
||||
assert '°' == state.attributes.get('unit_of_measurement')
|
||||
assert '81.8' == state.state
|
||||
assert '103.6' == state.state
|
||||
|
||||
state = self.hass.states.get('sensor.yr_humidity')
|
||||
assert '%' == state.attributes.get('unit_of_measurement')
|
||||
assert '79.6' == state.state
|
||||
assert '55.5' == state.state
|
||||
|
||||
state = self.hass.states.get('sensor.yr_fog')
|
||||
assert '%' == state.attributes.get('unit_of_measurement')
|
||||
@ -77,4 +77,4 @@ class TestSensorYr:
|
||||
|
||||
state = self.hass.states.get('sensor.yr_wind_speed')
|
||||
assert 'm/s', state.attributes.get('unit_of_measurement')
|
||||
assert '4.3' == state.state
|
||||
assert '3.5' == state.state
|
||||
|
Loading…
x
Reference in New Issue
Block a user