Пример #1
0
    def test_GeoJsonParameter(self):
        from clld.web.adapters import GeoJsonParameter

        adapter = GeoJsonParameter(None)
        self.assertTrue('{' in adapter.render(Parameter.get('no-domain'),
                                              self.env['request']))

        self.set_request_properties(params=dict(domainelement='de'))
        self.assertTrue('{' in adapter.render(Parameter.get('parameter'),
                                              self.env['request']))
Пример #2
0
    def test_GeoJsonParameter(self):
        from clld.web.adapters import GeoJsonParameter

        adapter = GeoJsonParameter(None)
        self.assertTrue(
            '{' in adapter.render(Parameter.get('no-domain'), self.env['request']))

        self.set_request_properties(params=dict(domainelement='de'))
        self.assertTrue(
            '{' in adapter.render(Parameter.get('parameter'), self.env['request']))
Пример #3
0
 def feature_properties(self, ctx, req, vs):
     res = GeoJsonParameter.feature_properties(self, ctx, req, vs)
     res.update(icon=self.obj['icon'])
     return res
Пример #4
0
 def feature_properties(self, ctx, req, vs):
     res = GeoJsonParameter.feature_properties(self, ctx, req, vs)
     res.update(icon=self.obj['icon'])
     return res