def test_locate_edit_geojson(self):
        pk = self.instance.pk
        loc1 = self.instance.locations.all()[0]
        loc2 = self.instance.locations.all()[1]
        expected = {
            'type': 'FeatureCollection',
            'features': [{
                "id": loc1.pk,
                "type": "Feature",
                "properties": {
                    "@index": 0,
                    "accuracy": None,
                    "is_primary": False,
                    "label": "Location %s - Test 1" % loc1.pk,
                    "name": None,
                },
                "geometry": {
                    "type": "Point",
                    "coordinates": [loc1.geometry.x, loc1.geometry.y],
                },
            }, {
                "id": loc2.pk,
                "type": "Feature",
                "properties": {
                    "@index": 1,
                    "accuracy": None,
                    "is_primary": False,
                    "label": "Location %s - Test 1" % loc2.pk,
                    "name": None,
                },
                "geometry": {
                    "type": "Point",
                    "coordinates": [loc2.geometry.x, loc2.geometry.y],
                }
            }],

            # NOTE: id/properties on FeatureCollection not part of GeoJSON spec
            'id': pk,
            'properties': {
                'edit': True,
                'name': 'Test 1',
                'label': 'Test 1',
            }
        }

        # Test for expected response
        response = self.client.get('/locatedmodels/%s/edit.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_edit_geojson/original