def test_closest_function_state_with_invalid_location(self):
        self.hass.states.set('test_domain.closest_home', 'happy', {
            'latitude': 'invalid latitude',
            'longitude': self.hass.config.longitude + 0.1,
        })

        self.assertEqual(
            'None',
            template.render(
                self.hass,
                '{{ closest(states.test_domain.closest_home, '
                'states) }}'))
.
dataset/ETHPy150Open home-assistant/home-assistant/tests/helpers/test_template.py/TestUtilTemplate.test_closest_function_state_with_invalid_location