Skip to content
Permalink
Browse files

Update landing page tests

  • Loading branch information
pblottiere committed Aug 27, 2020
1 parent 028634f commit 353e593076b61dfd0cf406dcad6d636c28a54e62
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/src/python/test_qgsserver_landingpage.py
@@ -66,10 +66,10 @@ def setUp(self):

super().setUp()
os.environ["QGIS_SERVER_DISABLED_APIS"] = ''
os.environ['QGIS_SERVER_PROJECTS_DIRECTORIES'] = '||'.join(self.directories)
os.environ['QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES'] = '||'.join(self.directories)

if not os.environ.get('TRAVIS', False):
os.environ['QGIS_SERVER_PROJECTS_PG_CONNECTIONS'] = "postgresql://localhost:5432?sslmode=disable&dbname=landing_page_test&schema=public"
os.environ['QGIS_SERVER_LANDING_PAGE_PROJECTS_PG_CONNECTIONS'] = "postgresql://localhost:5432?sslmode=disable&dbname=landing_page_test&schema=public"

def test_landing_page_redirects(self):
"""Test landing page redirects"""
@@ -156,8 +156,8 @@ def test_project_json(self):
def test_landing_page_json_empty(self):
"""Test landing page in JSON format with no projects"""

os.environ['QGIS_SERVER_PROJECTS_DIRECTORIES'] = ''
os.environ['QGIS_SERVER_PROJECTS_PG_CONNECTIONS'] = ''
os.environ['QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES'] = ''
os.environ['QGIS_SERVER_LANDING_PAGE_PROJECTS_PG_CONNECTIONS'] = ''
request = QgsBufferServerRequest('http://server.qgis.org/index.json')
self.compareApi(
request, None, 'test_landing_page_empty_index.json', subdir='landingpage')

0 comments on commit 353e593

Please sign in to comment.
You can’t perform that action at this time.