Skip to content

Commit

Permalink
Pylint var names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Place committed Feb 28, 2014
1 parent d39795d commit 5ce9c2c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/unit/modules/brew_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# Global Variables
brew.__salt__ = {}

taps_string = 'homebrew/dupes\nhomebrew/science\nhomebrew/x11'
taps_list = ['homebrew/dupes', 'homebrew/science', 'homebrew/x11']
TAPS_STRING = 'homebrew/dupes\nhomebrew/science\nhomebrew/x11'
TAPS_LIST = ['homebrew/dupes', 'homebrew/science', 'homebrew/x11']


class BrewTestCase(TestCase):
Expand All @@ -29,11 +29,11 @@ def test_list_taps(self):
'''
Tests the return of the list of taps
'''
mock_taps = MagicMock(return_value=taps_string)
mock_taps = MagicMock(return_value=TAPS_STRING)
with patch.dict(brew.__salt__, {'cmd.run': mock_taps}):
self.assertEqual(brew._list_taps(), taps_list)
self.assertEqual(brew._list_taps(), TAPS_LIST)

@patch('salt.modules.brew._list_taps', MagicMock(return_value=taps_list))
@patch('salt.modules.brew._list_taps', MagicMock(return_value=TAPS_LIST))
def test_tap_installed(self):
'''
Tests if tap argument is already installed or not
Expand All @@ -49,7 +49,7 @@ def test_tap_failure(self):
with patch.dict(brew.__salt__, {'cmd.retcode': mock_failure}):
self.assertFalse(brew._tap('homebrew/test'))

@patch('salt.modules.brew._list_taps', MagicMock(return_value=taps_list))
@patch('salt.modules.brew._list_taps', MagicMock(return_value=TAPS_LIST))
def test_tap(self):
'''
Tests adding unofficial Github repos to the list of brew taps
Expand Down

0 comments on commit 5ce9c2c

Please sign in to comment.