Skip to content

Commit

Permalink
- Restoring Live Server port settings on integration tests in order …
Browse files Browse the repository at this point in the history
…to avoid address conflicts
  • Loading branch information
afabiani committed Apr 20, 2018
1 parent 8b93fa2 commit e7a45e6
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions geonode/tests/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from urlparse import urljoin

from django.conf import settings

from django.test.utils import override_settings
from django.core.exceptions import ObjectDoesNotExist
from django.core.management import call_command
from django.core.urlresolvers import reverse
Expand Down Expand Up @@ -140,11 +140,13 @@ def zip_dir(basedir, archivename):
"""


@override_settings(SITEURL='http://localhost:8010/')
class NormalUserTest(GeoNodeLiveTestSupport):

"""
Tests GeoNode functionality for non-administrative users
"""
port = 8010

@timeout_decorator.timeout(LOCAL_TIMEOUT)
def test_layer_upload(self):
Expand Down Expand Up @@ -175,10 +177,13 @@ def test_layer_upload(self):
saved_layer.delete()


@override_settings(SITEURL='http://localhost:8001/')
class GeoNodeMapTest(GeoNodeLiveTestSupport):

"""Tests geonode.maps app/module
"""
Tests geonode.maps app/module
"""
port = 8001

# geonode.maps.utils
@timeout_decorator.timeout(LOCAL_TIMEOUT)
Expand Down Expand Up @@ -990,9 +995,12 @@ def test_importlayer_mgmt_command(self):
lyr.delete()


@override_settings(SITEURL='http://localhost:8002/')
class GeoNodePermissionsTest(GeoNodeLiveTestSupport):
"""Tests GeoNode permissions and its integration with GeoServer
"""
Tests GeoNode permissions and its integration with GeoServer
"""
port = 8002

"""
AF: This test must be refactored. Opening an issue for that.
Expand Down Expand Up @@ -1174,10 +1182,13 @@ def test_unpublished(self):
layer.delete()


@override_settings(SITEURL='http://localhost:8003/')
class GeoNodeThumbnailTest(GeoNodeLiveTestSupport):

"""Tests thumbnails behavior for layers and maps.
"""
Tests thumbnails behavior for layers and maps.
"""
port = 8003

@timeout_decorator.timeout(LOCAL_TIMEOUT)
def test_layer_thumbnail(self):
Expand Down Expand Up @@ -1234,10 +1245,13 @@ def test_map_thumbnail(self):
saved_layer.delete()


@override_settings(SITEURL='http://localhost:8004/')
class GeoNodeMapPrintTest(GeoNodeLiveTestSupport):

"""Tests geonode.maps print
"""
Tests geonode.maps print
"""
port = 8004

@timeout_decorator.timeout(LOCAL_TIMEOUT)
def testPrintProxy(self):
Expand Down Expand Up @@ -1325,10 +1339,13 @@ def testPrintProxy(self):
pass


@override_settings(SITEURL='http://localhost:8005/')
class GeoNodeGeoServerSync(GeoNodeLiveTestSupport):

"""Tests GeoNode/GeoServer syncronization
"""
Tests GeoNode/GeoServer syncronization
"""
port = 8005

@on_ogc_backend(geoserver.BACKEND_PACKAGE)
@timeout_decorator.timeout(LOCAL_TIMEOUT)
Expand Down Expand Up @@ -1366,10 +1383,13 @@ def test_set_attributes_from_geoserver(self):
layer.delete()


@override_settings(SITEURL='http://localhost:8006/')
class GeoNodeGeoServerCapabilities(GeoNodeLiveTestSupport):

"""Tests GeoNode/GeoServer GetCapabilities per layer, user, category and map
"""
Tests GeoNode/GeoServer GetCapabilities per layer, user, category and map
"""
port = 8006

@on_ogc_backend(geoserver.BACKEND_PACKAGE)
@timeout_decorator.timeout(LOCAL_TIMEOUT)
Expand Down Expand Up @@ -1470,9 +1490,11 @@ def test_capabilities(self):
layer3.delete()


@override_settings(SITEURL='http://localhost:8007/')
class LayersStylesApiInteractionTests(
ResourceTestCaseMixin, GeoNodeLiveTestSupport):
"""Test Layers"""
port = 8007

def setUp(self):
super(LayersStylesApiInteractionTests, self).setUp()
Expand Down Expand Up @@ -1724,8 +1746,12 @@ def test_add_delete_styles(self):
self.assertEqual(meta['total_count'], 0)


@override_settings(SITEURL='http://localhost:8008/')
class GeoTIFFIOTest(GeoNodeLiveTestSupport):
"""Tests integration of geotiff.io"""
"""
Tests integration of geotiff.io
"""
port = 8008

def testLink(self):
thefile = os.path.join(gisdata.RASTER_DATA, 'test_grid.tif')
Expand Down

0 comments on commit e7a45e6

Please sign in to comment.