Skip to content

Commit

Permalink
- fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Oct 3, 2018
1 parent 45cd162 commit 26fe995
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 35 deletions.
2 changes: 1 addition & 1 deletion geonode/layers/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def decimal_encode(bbox):
bbox_to_projection([float(coord) for coord in layer_bbox] + [lyr.srid, ],
target_srid=4326)[:4])
logger.info(projected_bbox)
self.assertEquals(projected_bbox, [-180.0, -90.0, 180.0,90.0])
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(
Expand Down
27 changes: 0 additions & 27 deletions geonode/security/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,33 +321,6 @@ def set_geowebcache_invalidate_cache(layer_alternate):
logger.debug(tb)


@on_ogc_backend(geoserver.BACKEND_PACKAGE)
def set_geowebcache_invalidate_cache(layer_alternate):
"""invalidate GeoWebCache Cache Rules"""
try:
url = settings.OGC_SERVER['default']['LOCATION']
user = settings.OGC_SERVER['default']['USER']
passwd = settings.OGC_SERVER['default']['PASSWORD']
# Check first that the rules does not exist already
"""
curl -v -u admin:geoserver \
-H "Content-type: text/xml" \
-d "<truncateLayer><layerName>{layer_alternate}</layerName></truncateLayer>" \
http://localhost:8080/geoserver/gwc/rest/masstruncate
"""
headers = {'Content-type': 'text/xml'}
payload = "<truncateLayer><layerName>%s</layerName></truncateLayer>" % layer_alternate
r = requests.post(url + 'gwc/rest/masstruncate',
headers=headers,
data=payload,
auth=HTTPBasicAuth(user, passwd))
if (r.status_code < 200 or r.status_code > 201):
logger.warning("Could not Truncate GWC Cache for Layer '%s'." % layer_alternate)
except Exception:
tb = traceback.format_exc()
logger.debug(tb)


@on_ogc_backend(geoserver.BACKEND_PACKAGE)
def set_geofence_all(instance):
"""assign access permissions to all users
Expand Down
7 changes: 0 additions & 7 deletions geonode/tests/smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ def test_default_contrib_apps_loaded(self):
except BaseException:
self.assertTrue(False)

if 'geonode.contrib.themes' in settings.INSTALLED_APPS:
try:
import geonode.contrib.themes # noqa
self.assertTrue(True)
except BaseException:
self.assertTrue(False)

# Basic Pages #

def test_home_page(self):
Expand Down

0 comments on commit 26fe995

Please sign in to comment.