def test_upgrade_available(self):
        mock = MagicMock(return_value='A\n B\n SAME')
        with patch.dict(pkgutil.__salt__, {'cmd.run_stdout': mock}):
            self.assertEqual(pkgutil.upgrade_available('CSWpython'), '')

        mock = MagicMock(side_effect=['A\n B\n SALT', None])
        with patch.dict(pkgutil.__salt__, {'cmd.run_stdout': mock}):
            self.assertEqual(pkgutil.upgrade_available('CSWpython'), 'SALT')

            self.assertEqual(pkgutil.upgrade_available('CSWpython'), '')

    # 'list_upgrades' function tests: 1
topic private in unread list
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/pkgutil_test.py/PkgutilTestCase.test_upgrade_available--crossover with--dataset/ETHPy150Open nitely/Spirit/spirit/topic/unread/tests.py/TopicUnreadViewTest.test_topic_unread_list_show_private_topic