cfc23b0091d55b53eef9654fe0e9134ac12b8c38,tests/components/test_history.py,TestComponentHistory,test_state_changes_during_period,#TestComponentHistory#,101
Before Change
start = dt_util.utcnow()
time.sleep(1)
states = [
set_state("idle"),
set_state("Netflix"),
After Change
set_state("YouTube")
start = dt_util.utcnow()
point = start + timedelta(seconds=1)
end = point + timedelta(seconds=1)
with patch("homeassistant.util.dt.utcnow", return_value=point):
states = [
set_state("idle"),
set_state("Netflix"),
set_state("Plex"),
set_state("YouTube"),
]
with patch("homeassistant.util.dt.utcnow", return_value=end):
set_state("Netflix")
set_state("Plex")
self.assertEqual(
{entity_id: states},
history.state_changes_during_period(start, end, entity_id))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: home-assistant/home-assistant
Commit Name: cfc23b0091d55b53eef9654fe0e9134ac12b8c38
Time: 2015-09-12
Author: paulus@paulusschoutsen.nl
File Name: tests/components/test_history.py
Class Name: TestComponentHistory
Method Name: test_state_changes_during_period
Project Name: home-assistant/home-assistant
Commit Name: cfc23b0091d55b53eef9654fe0e9134ac12b8c38
Time: 2015-09-12
Author: paulus@paulusschoutsen.nl
File Name: tests/components/test_history.py
Class Name: TestComponentHistory
Method Name: test_get_states
Project Name: home-assistant/home-assistant
Commit Name: cfc23b0091d55b53eef9654fe0e9134ac12b8c38
Time: 2015-09-12
Author: paulus@paulusschoutsen.nl
File Name: tests/test_core.py
Class Name: TestStateMachine
Method Name: test_last_changed_not_updated_on_same_state