@skipIfSpatialite
    def test_filter_contains(self):
        points_inside_golden_gate_park = """{"coordinates": [[-122.475233, 37.768616999999999], [-122.470416, 37.767381999999998]], "type": "MultiPoint"}"""

        # Get polys that contain the points
        response = self.client.get('/api/v1/geonotes/?polys__contains=%s' % quote(points_inside_golden_gate_park), HTTP_ACCEPT='application/json')
        self.assertEqual(response.status_code, 200)

        data = json.loads(response.content.decode('utf-8'))
        # We get back the golden gate park polygon!
        self.assertEqual(data['objects'][0]['content'], "This is a note about Golden Gate Park. It contains Golden Gate Park\'s polygon")
        self.assertEqual(data['objects'][0]['polys']['type'], 'MultiPolygon')
        self.assertEqual(len(data['objects'][0]['polys']['coordinates']), 1)
        self.assertEqual(len(data['objects'][0]['polys']['coordinates'][0]), 1)
        self.assertEqual(len(data['objects'][0]['polys']['coordinates'][0][0]), 8)
dataset/ETHPy150Open django-tastypie/django-tastypie/tests/gis/tests/views.py/MoreViewsTestCase.test_filter_contains/original