def test_mock_results(self):
     self.mock_random = self.set_up_patch('joomla_dependencies.version_generators.random.randint')
     self.mock_random.side_effect = [6, 6]
     res = generate_legacy_versions()
     self.assertEqual(res, '1.6.6')
 def test_that_unsupported_versions_are_detected_regex(self):
     self.mock_random = self.set_up_patch('joomla_dependencies.version_generators.random.randint')
     self.mock_random.side_effect = [6, 8]
     with self.assertRaises(ValueError):
         generate_legacy_versions()
 def test_generate_version_random(self):
     ver1 = generate_legacy_versions()
     ver2 = generate_legacy_versions()
     self.assertNotEqual(ver1, ver2)