def test_multiversion_task(self):
        suite_name = "suite_1"
        distro_name = "distro_1"
        variant = "build_variant"
        evg_conf_mock = MagicMock()
        evg_conf_mock.get_task.return_value.is_generate_resmoke_task = False
        task_mock = create_variant_task_mock("task 1", suite_name, distro_name)
        task_mock.require_multiversion = True
        test_list = [f"test{i}.js" for i in range(3)]
        tests_by_suite = {
            suite_name: test_list,
            "suite 2": [f"test{i}.js" for i in range(1)],
            "suite 3": [f"test{i}.js" for i in range(2)],
        }

        task_info = TaskInfo.from_task(task_mock, tests_by_suite,
                                       evg_conf_mock, variant)

        self.assertIn(suite_name, task_info.resmoke_args)
        for test in test_list:
            self.assertIn(test, task_info.tests)
        self.assertEqual(task_mock.require_multiversion,
                         task_info.require_multiversion)
        self.assertEqual(distro_name, task_info.distro)
    def test_get_config_for_test_mapping_when_task_does_not_exist(
            self, find_task_mock):
        find_task_mock.return_value = None
        tests_by_task = {
            "jsCore_auth":
            TaskInfo(
                display_task_name="task 1",
                tests=[
                    "jstests/core/currentop_waiting_for_latch.js",
                    "jstests/core/latch_analyzer.js",
                ],
                resmoke_args="",
                require_multiversion_setup=False,
                distro="",
                suite="core",
                build_variant="dummy_variant",
            ),
        }

        task_config_service = under_test.TaskConfigService()
        task_configs = task_config_service.get_task_configs_for_test_mappings(
            tests_by_task, MagicMock())

        self.assertEqual(task_configs, {})