mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Synchronize locale handling for test drivers.
This commit is contained in:
@@ -25,7 +25,6 @@ from galaxy.util.properties import load_app_properties
|
||||
from galaxy.web import buildapp
|
||||
|
||||
default_galaxy_test_host = "localhost"
|
||||
default_galaxy_locales = 'en'
|
||||
default_galaxy_test_file_dir = "test-data,https://github.com/galaxyproject/galaxy-test-data.git"
|
||||
migrated_tool_panel_config = 'config/migrated_tools_conf.xml'
|
||||
installed_tool_panel_configs = [
|
||||
@@ -93,14 +92,11 @@ def main():
|
||||
galaxy_test_port = os.environ.get( 'GALAXY_TEST_PORT', None )
|
||||
galaxy_test_save = os.environ.get( 'GALAXY_TEST_SAVE', None)
|
||||
tool_path = os.environ.get( 'GALAXY_TEST_TOOL_PATH', 'tools' )
|
||||
if 'HTTP_ACCEPT_LANGUAGE' not in os.environ:
|
||||
os.environ[ 'HTTP_ACCEPT_LANGUAGE' ] = default_galaxy_locales
|
||||
testing_migrated_tools = __check_arg( '-migrated' )
|
||||
testing_installed_tools = __check_arg( '-installed' )
|
||||
datatypes_conf_override = None
|
||||
|
||||
framework_tool_dir = os.path.join('test', 'functional', 'tools')
|
||||
|
||||
if testing_migrated_tools or testing_installed_tools:
|
||||
# Store a jsonified dictionary of tool_id : GALAXY_TEST_FILE_DIR pairs.
|
||||
galaxy_tool_shed_test_file = 'shed_tools_dict'
|
||||
|
||||
@@ -25,6 +25,8 @@ from .instrument import StructuredTestDataPlugin
|
||||
|
||||
galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir))
|
||||
|
||||
DEFAULT_LOCALES = "en"
|
||||
|
||||
|
||||
def setup_tool_shed_tmp_dir():
|
||||
tool_shed_test_tmp_dir = os.environ.get('TOOL_SHED_TEST_TMP_DIR', None)
|
||||
@@ -40,6 +42,8 @@ def setup_tool_shed_tmp_dir():
|
||||
def configure_environment():
|
||||
"""Hack up environment for test cases."""
|
||||
# no op remove if unused
|
||||
if 'HTTP_ACCEPT_LANGUAGE' not in os.environ:
|
||||
os.environ[ 'HTTP_ACCEPT_LANGUAGE' ] = DEFAULT_LOCALES
|
||||
|
||||
|
||||
def build_logger():
|
||||
|
||||
@@ -27,7 +27,6 @@ from galaxy.web import buildapp as galaxybuildapp
|
||||
from functional import database_contexts
|
||||
|
||||
default_tool_shed_test_host = "localhost"
|
||||
default_tool_shed_locales = 'en'
|
||||
default_galaxy_test_host = 'localhost'
|
||||
|
||||
# Use separate databases for Galaxy and tool shed install info by default,
|
||||
@@ -75,8 +74,6 @@ def main():
|
||||
galaxy_test_host = os.environ.get( 'GALAXY_TEST_HOST', default_galaxy_test_host )
|
||||
galaxy_test_port = os.environ.get( 'GALAXY_TEST_PORT', None )
|
||||
tool_path = os.environ.get( 'TOOL_SHED_TEST_TOOL_PATH', 'tools' )
|
||||
if 'HTTP_ACCEPT_LANGUAGE' not in os.environ:
|
||||
os.environ[ 'HTTP_ACCEPT_LANGUAGE' ] = default_tool_shed_locales
|
||||
tool_shed_test_file_dir = os.environ.get( 'TOOL_SHED_TEST_FILE_DIR', default_tool_shed_test_file_dir )
|
||||
if not os.path.isabs( tool_shed_test_file_dir ):
|
||||
tool_shed_test_file_dir = tool_shed_test_file_dir
|
||||
|
||||
Reference in New Issue
Block a user