'Test distance function with 1 state 1 coord.'

def test_distance_function_with_1_state_1_coord(self):

    self.hass.states.set('test.object_2', 'happy', {'latitude': self.hass.config.latitude, 'longitude': self.hass.config.longitude})
    tpl = template.Template('{{    distance("32.87336",    "-117.22943",    states.test.object_2)    |    round    }}', self.hass)
    self.assertEqual('187', tpl.render())
    tpl2 = template.Template('{{    distance(states.test.object_2,    "32.87336",    "-117.22943")    |    round    }}', self.hass)
    self.assertEqual('187', tpl2.render())
