mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 22:49:32 -02:30
allow the bundled ansible virtualenv to be selected on JT/Proj
see: https://github.com/ansible/awx/issues/34
This commit is contained in:
@@ -173,11 +173,15 @@ def test_extract_ansible_vars():
|
||||
|
||||
|
||||
def test_get_custom_venv_choices():
|
||||
assert common.get_custom_venv_choices() == []
|
||||
bundled_venv = os.path.join(settings.BASE_VENV_PATH, 'ansible', '')
|
||||
assert common.get_custom_venv_choices() == [bundled_venv]
|
||||
|
||||
with TemporaryDirectory(dir=settings.BASE_VENV_PATH) as temp_dir:
|
||||
with TemporaryDirectory(dir=settings.BASE_VENV_PATH, prefix='tmp') as temp_dir:
|
||||
os.makedirs(os.path.join(temp_dir, 'bin', 'activate'))
|
||||
assert common.get_custom_venv_choices() == [os.path.join(temp_dir, '')]
|
||||
assert sorted(common.get_custom_venv_choices()) == [
|
||||
bundled_venv,
|
||||
os.path.join(temp_dir, '')
|
||||
]
|
||||
|
||||
|
||||
def test_region_sorting():
|
||||
|
||||
Reference in New Issue
Block a user