def test_filter_within_on_points(self):

        # Get points
        response = self.client.get('/api/v1/geonotes/?points__within=%s' % golden_gate_park_query, HTTP_ACCEPT='application/json')
        self.assertEqual(response.status_code, 200)

        data = json.loads(response.content.decode('utf-8'))
        # We get back the points inside Golden Gate park!
        self.assertEqual(data['objects'][0]['content'], "Wooo two points inside Golden Gate park")
        self.assertEqual(data['objects'][0]['points']['type'], 'MultiPoint')
        self.assertAlmostEqual(data['objects'][0]['points']['coordinates'][0][0], -122.475233, places=5)
        self.assertAlmostEqual(data['objects'][0]['points']['coordinates'][0][1], 37.768616, places=5)
        self.assertAlmostEqual(data['objects'][0]['points']['coordinates'][1][0], -122.470416, places=5)
        self.assertAlmostEqual(data['objects'][0]['points']['coordinates'][1][1], 37.767381, places=5)
dataset/ETHPy150Open django-tastypie/django-tastypie/tests/gis/tests/views.py/MoreViewsTestCase.test_filter_within_on_points/original