def test_get_old_happy_unhappy_draining_tasks_not_empty(self):
        fake_name = 'whoa'
        fake_instance = 'the_earth_is_tiny'
        fake_id = marathon_tools.format_job_id(fake_name, fake_instance)

        fake_apps = [
            mock.Mock(
                id=fake_id,
                tasks=[
                    self.fake_task('up', 'happy'),
                    self.fake_task('up', 'unhappy'),
                    self.fake_task('down', 'unhappy'),
                ],
            ),
            mock.Mock(
                id=('%s2' % fake_id),
                tasks=[
                    self.fake_task('up', 'happy'),
                    self.fake_task('up', 'unhappy'),
                    self.fake_task('down', 'unhappy'),
                ],
            ),
        ]

        fake_system_paasta_config = utils.SystemPaastaConfig({}, "/fake/configs")

        expected_live_happy_tasks = {
            fake_apps[0].id: set([fake_apps[0].tasks[0]]),
            fake_apps[1].id: set([fake_apps[1].tasks[0]]),
        }
        expected_live_unhappy_tasks = {
            fake_apps[0].id: set([fake_apps[0].tasks[1]]),
            fake_apps[1].id: set([fake_apps[1].tasks[1]]),
        }
        expected_draining_tasks = {
            fake_apps[0].id: set([fake_apps[0].tasks[2]]),
            fake_apps[1].id: set([fake_apps[1].tasks[2]]),
        }

        with mock.patch('paasta_tools.bounce_lib.get_happy_tasks', side_effect=self.fake_get_happy_tasks):
            actual = setup_marathon_job.get_old_happy_unhappy_draining_tasks(
                fake_apps,
                self.fake_drain_method(),
                service=fake_name,
                nerve_ns=fake_instance,
                bounce_health_params={},
                system_paasta_config=fake_system_paasta_config,
            )
        actual_live_happy_tasks, actual_live_unhappy_tasks, actual_draining_tasks = actual
        assert actual_live_happy_tasks == expected_live_happy_tasks
        assert actual_live_unhappy_tasks == expected_live_unhappy_tasks
        assert actual_draining_tasks == expected_draining_tasks
dataset/ETHPy150Open Yelp/paasta/tests/test_setup_marathon_job.py/TestGetOldHappyUnhappyDrainingTasks.test_get_old_happy_unhappy_draining_tasks_not_empty/original