Merge branch '2015.2' into develop

This commit is contained in:
Pedro Algarvio 2015-01-12 17:13:57 +00:00
commit eeb6dadc21
2 changed files with 4 additions and 8 deletions

View File

@ -36,7 +36,7 @@ def _list_taps():
return _call_brew(cmd)['stdout'].splitlines()
def _tap(tap):
def _tap(tap, runas=None):
'''
Add unofficial Github repos to the list of formulas that brew tracks,
updates, and installs from.

View File

@ -61,7 +61,8 @@ class BrewTestCase(TestCase):
mock_cmd = MagicMock(return_value='')
with patch.dict(brew.__salt__, {'cmd.run_all': mock_failure,
'file.get_user': mock_user,
'cmd.run': mock_cmd}):
'cmd.run': mock_cmd,
'cmd.retcode': mock_failure}):
self.assertFalse(brew._tap('homebrew/test'))
@patch('salt.modules.brew._list_taps', MagicMock(return_value=TAPS_LIST))
@ -69,12 +70,7 @@ class BrewTestCase(TestCase):
'''
Tests adding unofficial Github repos to the list of brew taps
'''
mock_success = MagicMock(return_value={'retcode': 0})
mock_user = MagicMock(return_value='foo')
mock_cmd = MagicMock(return_value='')
with patch.dict(brew.__salt__, {'cmd.run_all': mock_success,
'file.get_user': mock_user,
'cmd.run': mock_cmd}):
with patch.dict(brew.__salt__, {'cmd.retcode': MagicMock(return_value=0)}):
self.assertTrue(brew._tap('homebrew/test'))
# '_homebrew_bin' function tests: 1