Skip to content

Commit

Permalink
feat(format): Format test_mac_brew_pkg.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cdalvaro committed Aug 7, 2019
1 parent 2ae594b commit b570a0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/unit/modules/test_mac_brew_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class BrewTestCase(TestCase, LoaderModuleMockMixin):
'''
TestCase for salt.modules.mac_brew module
'''

def setup_loader_modules(self):
return {mac_brew: {'__opts__': {'user': MagicMock(return_value='bar')}}}

Expand Down Expand Up @@ -63,8 +64,8 @@ def test_tap_failure(self):
mock_user = MagicMock(return_value='foo')
mock_cmd = MagicMock(return_value='')
with patch.dict(mac_brew.__salt__, {'cmd.run_all': mock_failure,
'file.get_user': mock_user,
'cmd.run': mock_cmd}), \
'file.get_user': mock_user,
'cmd.run': mock_cmd}), \
patch('salt.modules.mac_brew_pkg._list_taps', MagicMock(return_value={})):
self.assertFalse(mac_brew._tap('homebrew/test'))

Expand Down Expand Up @@ -217,7 +218,7 @@ def test_refresh_db(self):
mock_user = MagicMock(return_value='foo')
mock_success = MagicMock(return_value={'retcode': 0})
with patch.dict(mac_brew.__salt__, {'file.get_user': mock_user,
'cmd.run_all': mock_success}), \
'cmd.run_all': mock_success}), \
patch('salt.modules.mac_brew_pkg._homebrew_bin',
MagicMock(return_value=HOMEBREW_BIN)):
with patch.object(salt.utils.pkg, 'clear_rtag', Mock()):
Expand Down

0 comments on commit b570a0e

Please sign in to comment.