def test_version(self):
        mock = MagicMock(return_value='out')
        with patch.dict(grub_legacy.__salt__, {'cmd.run': mock}):
            self.assertEqual(grub_legacy.version(), 'out')
Test for Return server version from grub --version
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/grub_legacy_test.py/GrublegacyTestCase.test_version