Exemple #1
0
    def test_latest_version(self):
        '''
        Test the latest version of the named package available for upgrade or installation.

        :return:
        '''
        with patch('salt.modules.zypper.__zypper__', ZyppCallMock(return_value=get_test_data('zypper-available.txt'))):
            self.assertEqual(zypper.latest_version('vim'), '7.4.326-2.62')
Exemple #2
0
    def test_latest_version(self):
        '''
        Test the latest version of the named package available for upgrade or installation.

        :return:
        '''
        with patch('salt.modules.zypper.__zypper__', ZyppCallMock(return_value=get_test_data('zypper-available.txt'))):
            self.assertEqual(zypper.latest_version('vim'), '7.4.326-2.62')
Exemple #3
0
    def test_latest_version(self):
        '''
        Test the latest version of the named package available for upgrade or installation.

        :return:
        '''
        ref_out = get_test_data('zypper-available.txt')
        with patch.dict(zypper.__salt__,
                        {'cmd.run_stdout': MagicMock(return_value=ref_out)}):
            self.assertEqual(zypper.latest_version('vim'), '7.4.326-2.62')