def test_locate_detail_geojson(self):
        pk = self.instance.pk
        loc1 = self.instance.locations.all()[0]
        loc2 = self.instance.locations.all()[1]
        expected = {
            'id': pk,
            'type': 'Feature',
            'properties': {
                'name': 'Test 1',
                'label': 'Test 1',
            },
            'geometry': {
                "type": "GeometryCollection",
                "geometries": [
                    {
                        "type": "Point",
                        "coordinates": [loc1.geometry.x, loc1.geometry.y],
                        "@index": 0,
                    },
                    {
                        "type": "Point",
                        "coordinates": [loc2.geometry.x, loc2.geometry.y],
                        "@index": 1,
                    }
                ]
            }
        }

        # NOTE: @index is wq.db-specific and not part of the GeoJSON spec

        # Test for expected response
        response = self.client.get('/locatedmodels/%s.geojson' % pk)
        data = json.loads(response.content.decode('utf-8'))
        self.assertEqual(expected, data)
dataset/ETHPy150Open wq/wq.db/tests/test_locate.py/LocateRestTestCase.test_locate_detail_geojson/original