# HG changeset patch # User Mads Kiilerich # Date 1495993343 -7200 # Node ID f0705609e494461fb1611581ff6ddf8dd7733d3e # Parent 6452215a54ee786d65cf96131dfc135a081f274a tests: drop 'environ' as global variable - just pass it to URLGenerator as temporary variable HTTP_HOST is mandatory - specify it as 'example.com'. diff -r 6452215a54ee -r f0705609e494 kallithea/tests/base.py --- a/kallithea/tests/base.py Wed Mar 29 22:12:50 2017 +0200 +++ b/kallithea/tests/base.py Sun May 28 19:42:23 2017 +0200 @@ -39,7 +39,7 @@ testapp = None __all__ = [ - 'skipif', 'parametrize', 'environ', 'url', 'TestController', + 'skipif', 'parametrize', 'url', 'TestController', 'ldap_lib_installed', 'pam_lib_installed', 'invalidate_all_caches', 'TESTS_TMP_PATH', 'HG_REPO', 'GIT_REPO', 'NEW_HG_REPO', 'NEW_GIT_REPO', 'HG_FORK', 'GIT_FORK', 'TEST_USER_ADMIN_LOGIN', 'TEST_USER_ADMIN_PASS', @@ -54,8 +54,6 @@ # Invoke websetup with the current config file # SetupCommand('setup-app').run([config_file]) -environ = {} - #SOME GLOBALS FOR TESTS TESTS_TMP_PATH = os.path.join(tempfile.gettempdir(), 'rc_test_%s' % tempfile._RandomNameSequence().next()) diff -r 6452215a54ee -r f0705609e494 kallithea/tests/conftest.py --- a/kallithea/tests/conftest.py Wed Mar 29 22:12:50 2017 +0200 +++ b/kallithea/tests/conftest.py Sun May 28 19:42:23 2017 +0200 @@ -55,7 +55,7 @@ logging.disable(logging.NOTSET) - kallithea.tests.base.url = URLGenerator(RootController().mapper, kallithea.tests.base.environ) + kallithea.tests.base.url = URLGenerator(RootController().mapper, {'HTTP_HOST': 'example.com'}) @pytest.fixture