def _add_test_recorder_runs(hass):
    'Add a few recorder_runs for testing.'
    now = datetime.now()
    five_days_ago = (now - timedelta(days=5))
    eleven_days_ago = (now - timedelta(days=11))
    hass.block_till_done()
    hass.data[DATA_INSTANCE].block_till_done()
    wait_recording_done(hass)
    with recorder.session_scope(hass=hass) as session:
        for rec_id in range(6):
            if (rec_id < 2):
                timestamp = eleven_days_ago
            elif (rec_id < 4):
                timestamp = five_days_ago
            else:
                timestamp = now
            session.add(RecorderRuns(start=timestamp, created=dt_util.utcnow(), end=(timestamp + timedelta(days=1))))
Add a few recorder_runs for testing.
def _add_test_recorder_runs(hass):
    
    now = datetime.now()
    five_days_ago = (now - timedelta(days=5))
    eleven_days_ago = (now - timedelta(days=11))
    hass.block_till_done()
    hass.data[DATA_INSTANCE].block_till_done()
    wait_recording_done(hass)
    with recorder.session_scope(hass=hass) as session:
        for rec_id in range(6):
            if (rec_id < 2):
                timestamp = eleven_days_ago
            elif (rec_id < 4):
                timestamp = five_days_ago
            else:
                timestamp = now
            session.add(RecorderRuns(start=timestamp, created=dt_util.utcnow(), end=(timestamp + timedelta(days=1))))