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']))
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']))
def feature_properties(self, ctx, req, vs): res = GeoJsonParameter.feature_properties(self, ctx, req, vs) res.update(icon=self.obj['icon']) return res