'Test when start or end value is not a timestamp or a date.'

def test_wrong_date(self):

    good = Template('{{    now()    }}', self.hass)
    bad = Template('{{    TEST    }}', self.hass)
    sensor1 = HistoryStatsSensor(self.hass, 'test', 'on', good, bad, None, 'time', 'Test')
    sensor2 = HistoryStatsSensor(self.hass, 'test', 'on', bad, good, None, 'time', 'Test')
    before_update1 = sensor1._period
    before_update2 = sensor2._period
    sensor1.update_period()
    sensor2.update_period()
    self.assertEqual(before_update1, sensor1._period)
    self.assertEqual(before_update2, sensor2._period)
