'Test for if action after.'

def test_if_action_after(self):

    assert setup_component(self.hass, automation.DOMAIN, {automation.DOMAIN: {'trigger': {'platform': 'event', 'event_type': 'test_event'}, 'condition': {'condition': 'time', 'after': '10:00'}, 'action': {'service': 'test.automation'}}})
    before_10 = dt_util.now().replace(hour=8)
    after_10 = dt_util.now().replace(hour=14)
    with patch('homeassistant.helpers.condition.dt_util.now', return_value=before_10):
        self.hass.bus.fire('test_event')
        self.hass.block_till_done()
    self.assertEqual(0, len(self.calls))
    with patch('homeassistant.helpers.condition.dt_util.now', return_value=after_10):
        self.hass.bus.fire('test_event')
        self.hass.block_till_done()
    self.assertEqual(1, len(self.calls))
