@mock.patch('nailgun.api.v1.handlers.logs.DumpTaskManager')
    def test_log_package_handler_with_dump_task_manager_error(self,
                                                              dump_manager):

        def dump_task_with_bad_model(*args, **kwargs):
            raise errors.TaskAlreadyRunning()

        dump_manager().execute.side_effect = dump_task_with_bad_model

        resp = self.app.put(
            reverse('LogPackageHandler'), "[]",
            headers=self.default_headers, expect_errors=True
        )
        self.assertEqual(resp.status_code, 400)
Main entry point, configuration
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/unit/test_logs_handlers.py/TestLogs.test_log_package_handler_with_dump_task_manager_error--crossover with--dataset/ETHPy150Open sahana/eden/modules/templates/SAMBRO/controllers.py/index.__call__