def test_view_raster_api_v1_json(self):
        res = self.testapp.get('/api/raster/1.json', status='*')
        self.assertEqual(res.status_int, 200)

        loaded_json = json.loads(res.body)
        self.assertEqual(loaded_json['version'], RasterAPIv1.version())
        self.assertEqual(loaded_json['name'], RasterAPIv1.identifier())
    def test_view_raster_api_v1_json(self):
       res = self.testapp.get('/api/raster/1.json', status='*')
       self.assertEqual(res.status_int, 200)

       loaded_json = json.loads(res.body)
       self.assertEqual(loaded_json['version'], RasterAPIv1.version())
       self.assertEqual(loaded_json['name'], RasterAPIv1.identifier())
    def wms_data_url(self):
        log = logging.getLogger(__name__)
        log.debug('Processing ows request')

        data_url = None
        try:
            data_url = self.request.GET.getone('DATA_URL')
        except:
            log.warn('No data_url provided')
            data_url = None

        my_map = RasterAPIv1(data_url=data_url,
                             query_string=self.request.query_string.strip())
        map_content, map_content_type, retval = my_map.render()

        response = Response(map_content, content_type=map_content_type)

        return response
 def _to_dict(self):
     return RasterAPIv1.to_dict()
Beispiel #5
0
 def _to_dict(self):
     return RasterAPIv1.to_dict()