Skip to content
Permalink
Browse files

Fix port for WFS server integration tests

  • Loading branch information
elpaso committed Feb 22, 2018
1 parent 3142824 commit 3ce8dc12bee1663611a14fc37065a5177e3eae8d
Showing with 4 additions and 6 deletions.
  1. +1 −1 tests/src/python/qgis_wrapped_server.py
  2. +3 −5 tests/src/python/test_qgsserver_wfst.py
@@ -167,7 +167,7 @@ def do_GET(self, post_body=None):
for k, v in self.headers.items():
headers['HTTP_%s' % k.replace(' ', '-').replace('-', '_').replace(' ', '-').upper()] = v
if not self.path.startswith('http'):
self.path = "%s://%s:%s%s" % ('https' if https else 'http', QGIS_SERVER_HOST, QGIS_SERVER_PORT, self.path)
self.path = "%s://%s:%s%s" % ('https' if https else 'http', QGIS_SERVER_HOST, self.server.server_port, self.path)
request = QgsBufferServerRequest(self.path, (QgsServerRequest.PostMethod if post_body is not None else QgsServerRequest.GetMethod), headers, post_body)
response = QgsBufferServerResponse()
qgs_server.handleRequest(request, response)
@@ -56,10 +56,8 @@
unittest,
)

try:
QGIS_SERVER_WFST_PORT = os.environ['QGIS_SERVER_WFST_PORT']
except:
QGIS_SERVER_WFST_PORT = '0' # Auto
# 0 = auto
QGIS_SERVER_PORT = os.environ.get('QGIS_SERVER_PORT', '0')


qgis_app = start_app()
@@ -70,7 +68,7 @@ class TestWFST(unittest.TestCase):
@classmethod
def setUpClass(cls):
"""Run before all tests"""
cls.port = QGIS_SERVER_WFST_PORT
cls.port = QGIS_SERVER_PORT
# Create tmp folder
cls.temp_path = tempfile.mkdtemp()
cls.testdata_path = cls.temp_path + '/' + 'wfs_transactional' + '/'

0 comments on commit 3ce8dc1

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