def test_version_clean(self):
        with patch.dict(pkg_resource.__salt__, {'pkg.version_clean':
                                                MagicMock(return_value='A')}):
            self.assertEqual(pkg_resource.version_clean('version'), 'A')

        self.assertEqual(pkg_resource.version_clean('v'), 'v')
Test to clean the version string removing extra data.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/pkg_resource_test.py/PkgresTestCase.test_version_clean