Changeset - f0705609e494
[Not reviewed]
default
0 2 0
Mads Kiilerich - 8 years ago 2017-05-28 19:42:23
mads@kiilerich.com
tests: drop 'environ' as global variable - just pass it to URLGenerator as temporary variable

HTTP_HOST is mandatory - specify it as 'example.com'.
2 files changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/base.py
Show inline comments
 
@@ -39,7 +39,7 @@ url = None
 
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 @@ __all__ = [
 
# 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())
kallithea/tests/conftest.py
Show inline comments
 
@@ -55,7 +55,7 @@ def pytest_configure():
 

	
 
    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
0 comments (0 inline, 0 general)