Skip to content

Commit

Permalink
- Fix integration test_capabilities test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Oct 3, 2018
1 parent 5947733 commit cc3829f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions geonode/layers/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
from geonode.tests.utils import NotificationsTestsHelper
from geonode.layers import LayersAppConfig

import logging

logger = logging.getLogger(__name__)


class LayersTest(GeoNodeBaseTestSupport):

Expand Down Expand Up @@ -167,6 +171,7 @@ def test_layer_attributes(self):
def test_layer_bbox(self):
lyr = Layer.objects.all().first()
layer_bbox = lyr.bbox[0:4]
logger.info(layer_bbox)

def decimal_encode(bbox):
import decimal
Expand All @@ -181,11 +186,16 @@ def decimal_encode(bbox):
from geonode.utils import bbox_to_projection
projected_bbox = decimal_encode(
bbox_to_projection([float(coord) for coord in layer_bbox] + [lyr.srid, ],
target_srid=3857))
import logging
logger = logging.getLogger(__name__)
logger.info(layer_bbox)
target_srid=4326)[:4])
logger.info(projected_bbox)
self.assertEquals(projected_bbox, [-180.0, -90.0, 180.0,90.0])
logger.info(lyr.ll_bbox)
self.assertEquals(lyr.ll_bbox, [-180.0, 180.0, -90.0, 90.0, u'EPSG:4326'])
projected_bbox = decimal_encode(
bbox_to_projection([float(coord) for coord in layer_bbox] + [lyr.srid, ],
target_srid=3857)[:4])
logger.info(projected_bbox)
self.assertEquals(projected_bbox, [-19926188.852, -30240971.9584, 19926188.852, 30240971.9584])

def test_layer_attributes_feature_catalogue(self):
""" Test layer feature catalogue functionality
Expand Down

0 comments on commit cc3829f

Please sign in to comment.