def test_homebrew_bin(self): ''' Tests the path to the homebrew binary ''' mock_path = MagicMock(return_value='/usr/local') with patch.dict(brew.__salt__, {'cmd.run': mock_path}): self.assertEqual(brew._homebrew_bin(), '/usr/local/bin/brew')