'Test closest function invalid state.'

def test_closest_function_invalid_state(self):

    self.hass.states.set('test_domain.closest_home', 'happy', {'latitude': (self.hass.config.latitude + 0.1), 'longitude': (self.hass.config.longitude + 0.1)})
    for state in ('states.zone.non_existing', '"zone.non_existing"'):
        self.assertEqual('None', template.Template(('{{    closest(%s,    states)    }}' % state), self.hass).render())
