Fix test_issue_6833_pip_upgrade_pip test on OSX

This commit is contained in:
twangboy 2016-09-12 12:17:30 -06:00
parent 3c694a371b
commit 4ae8a43435
2 changed files with 5 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import glob
import shutil
import logging
import os
import sys
# Import salt libs
import salt.utils
@ -130,6 +131,9 @@ def create(path,
if venv_bin is None:
venv_bin = __opts__.get('venv_bin') or __pillar__.get('venv_bin')
if not os.path.exists(venv_bin):
venv_bin = '/'.join([os.path.dirname(sys.executable), venv_bin])
cmd = [venv_bin]
if 'pyvenv' not in venv_bin:

View File

@ -361,7 +361,6 @@ class PipStateTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn):
# previously installed
ret = self.run_function(
'pip.install', ['pip==6.0'], upgrade=True,
ignore_installed=True,
bin_env=venv_dir
)
try:
@ -375,7 +374,7 @@ class PipStateTest(integration.ModuleCase, integration.SaltReturnAssertsMixIn):
pprint.pprint(ret)
raise
# Le't make sure we have pip 6.0 installed
# Let's make sure we have pip 6.0 installed
self.assertEqual(
self.run_function('pip.list', ['pip'], bin_env=venv_dir),
{'pip': '6.0'}