a2e45b8fdde315b756691b4ae573ad55f55dc002,tests/components/test_recorder.py,TestRecorder,_add_test_states,#TestRecorder#,30
Before Change
"last_changed, last_updated, created,"
"utc_offset, event_id)"
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
("test.recorder2", "sensor", state,
json.dumps(attributes), timestamp, timestamp,
timestamp, -18000, event_id + 1000) )
def _add_test_events(self):
Add a few events for testing.
After Change
def _add_test_states(self):
Add multiple states to the db for testing.
now = datetime.now()
five_days_ago = now - timedelta(days=5)
attributes = {"test_attr": 5, "test_attr_10": "nice"}
self.hass.pool.block_till_done()
recorder._INSTANCE.block_till_done()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: home-assistant/home-assistant
Commit Name: a2e45b8fdde315b756691b4ae573ad55f55dc002
Time: 2016-07-02
Author: rhooper@toybox.ca
File Name: tests/components/test_recorder.py
Class Name: TestRecorder
Method Name: _add_test_states
Project Name: home-assistant/home-assistant
Commit Name: e5efc2e430b9f1009a8196a7de3eb198379cc852
Time: 2016-05-31
Author: themactep@gmail.com
File Name: homeassistant/components/sensor/time_date.py
Class Name: TimeDateSensor
Method Name: update
Project Name: home-assistant/home-assistant
Commit Name: a2e45b8fdde315b756691b4ae573ad55f55dc002
Time: 2016-07-02
Author: rhooper@toybox.ca
File Name: tests/components/test_recorder.py
Class Name: TestRecorder
Method Name: _add_test_events