def test_called_ntimes_according_to_arg(self):
     multi_legacy_gen(10)
     self.assertEqual(self.mock_generate.call_count, 10)
 def test_that_returns_correct_result_for_one_call(self):
     self.mock_generate.return_value = '1.6.7'
     res = multi_legacy_gen()
     self.assertEqual(res, [self.mock_generate.return_value])
 def test_called_once_without_parameter(self):
     multi_legacy_gen()
     self.assertEqual(self.mock_generate.call_count, 1)
 def test_that_empty_list_is_returned_with_zero_arg(self):
     res = multi_legacy_gen(0)
     self.assertFalse(self.mock_generate.called)
     self.assertEqual(res, [])