def update_data(self, data): open_status = projects_service.get_or_create_open_status() if "project_status_id" not in data: data["project_status_id"] = open_status["id"] if "team" in data: data["team"] = [ persons_service.get_person_raw(person_id) for person_id in data["team"] ] if "asset_types" in data: data["asset_types"] = [ assets_service.get_asset_type_raw(asset_type_id) for asset_type_id in data["asset_types"] ] if "task_statuses" in data: data["task_statuses"] = [ tasks_service.get_task_status_raw(task_status_id) for task_status_id in data["task_statuses"] ] if "task_types" in data: data["task_types"] = [ tasks_service.get_task_type_raw(task_type_id) for task_type_id in data["task_types"] ] if "status_automations" in data: data["status_automations"] = [ status_automations_service.get_status_automation_raw( task_type_id) for task_type_id in data["status_automations"] ] return data
def update_data(self, data): open_status = projects_service.get_or_create_open_status() if "project_status_id" not in data: data["project_status_id"] = open_status["id"] return data
def test_get_or_create_open_status(self): project_status = projects_service.get_or_create_open_status() self.assertEqual(project_status["name"], "Open")