Skip to content

Commit

Permalink
Renamed constants for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 3, 2016
1 parent d950e3b commit 9761a86
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
12 changes: 5 additions & 7 deletions tests/src/python/test_authmanager_endpoint.py
Expand Up @@ -45,14 +45,12 @@
unittest,
)


try:
QGIS_SERVER_AUTHMANAGER_DEFAULT_PORT = os.environ['QGIS_SERVER_AUTHMANAGER_DEFAULT_PORT']
QGIS_SERVER_ENDPOINT_PORT = os.environ['QGIS_SERVER_ENDPOINT_PORT']
except:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("", 0))
QGIS_SERVER_AUTHMANAGER_DEFAULT_PORT = s.getsockname()[1]
s.close()
QGIS_SERVER_ENDPOINT_PORT = '0' # Auto


QGIS_AUTH_DB_DIR_PATH = tempfile.mkdtemp()

Expand All @@ -67,7 +65,7 @@ class TestAuthManager(unittest.TestCase):
def setUpClass(cls):
"""Run before all tests:
Creates an auth configuration"""
cls.port = QGIS_SERVER_AUTHMANAGER_DEFAULT_PORT
cls.port = QGIS_SERVER_ENDPOINT_PORT
# Clean env just to be sure
env_vars = ['QUERY_STRING', 'QGIS_PROJECT_FILE']
for ev in env_vars:
Expand Down
6 changes: 3 additions & 3 deletions tests/src/python/test_offline_editing_wfs.py
Expand Up @@ -48,9 +48,9 @@


try:
QGIS_SERVER_WFST_DEFAULT_PORT = os.environ['QGIS_SERVER_WFST_DEFAULT_PORT']
QGIS_SERVER_OFFLINE_PORT = os.environ['QGIS_SERVER_OFFLINE_PORT']
except:
QGIS_SERVER_WFST_DEFAULT_PORT = '0' # Auto
QGIS_SERVER_OFFLINE_PORT = '0' # Auto

qgis_app = start_app()

Expand All @@ -63,7 +63,7 @@ class TestWFST(unittest.TestCase, OfflineTestBase):
@classmethod
def setUpClass(cls):
"""Run before all tests"""
cls.port = QGIS_SERVER_WFST_DEFAULT_PORT
cls.port = QGIS_SERVER_OFFLINE_PORT
# Create tmp folder
cls.temp_path = tempfile.mkdtemp()
cls.testdata_path = cls.temp_path + '/' + 'wfs_transactional' + '/'
Expand Down
10 changes: 3 additions & 7 deletions tests/src/python/test_qgsserver_wfst.py
Expand Up @@ -58,13 +58,9 @@
)

try:
QGIS_SERVER_WFST_DEFAULT_PORT = os.environ['QGIS_SERVER_WFST_DEFAULT_PORT']
QGIS_SERVER_WFST_PORT = os.environ['QGIS_SERVER_WFST_PORT']
except:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(("", 0))
QGIS_SERVER_WFST_DEFAULT_PORT = s.getsockname()[1]
s.close()
QGIS_SERVER_WFST_PORT = '0' # Auto


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

0 comments on commit 9761a86

Please sign in to comment.