docstr: ReportSchedule Api: Test update report schedule
docstr_tok: ["ReportSchedule","Api",":","Test","update","report","schedule"]
code: def test_update_report_schedule(self):
      """
      ReportSchedule Api: Test update report schedule
      """
      report_schedule = (
          db.session.query(ReportSchedule)
          .filter(ReportSchedule.name == "name2")
          .one_or_none()
      )
  
      self.login(username="admin")
      chart = db.session.query(Slice).first()
      example_db = get_example_database()
      report_schedule_data = {
          "type": ReportScheduleType.ALERT,
          "name": "changed",
          "description": "description",
          "crontab": "0 10 * * *",
          "recipients": [
              {
                  "type": ReportRecipientType.EMAIL,
                  "recipient_config_json": {
                      "target": "target@superset.org"
                  },
              }
          ],
          "chart": chart.id,
          "database": example_db.id,
      }
  
      uri = f"api/v1/report/{report_schedule.id}"
  
      rv = self.put_assert_metric(uri, report_schedule_data, "put")
      assert rv.status_code == 200
      updated_model = db.session.query(ReportSchedule).get(
          report_schedule.id
      )
      assert updated_model is not None
      assert updated_model.name == report_schedule_data["name"]
      assert (
          updated_model.description
          == report_schedule_data["description"]
      )
      assert len(updated_model.recipients) == 1
      assert updated_model.crontab == report_schedule_data["crontab"]
      assert updated_model.chart_id == report_schedule_data["chart"]
      assert (
          updated_model.database_id == report_schedule_data["database"]
      )
  
imports: from datetime import datetime
  import json
  import pytz
  import pytest
  import prison
  from parameterized import parameterized
  from sqlalchemy.sql import func
  from superset import db, security_manager
  from superset.models.core import Database
  from superset.models.slice import Slice
  from superset.models.dashboard import Dashboard
  from superset.reports.models import ReportSchedule, ReportCreationMethod, ReportRecipients, ReportExecutionLog, ReportScheduleType, ReportRecipientType, ReportState
  from superset.utils.database import get_example_database
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.conftest import with_feature_flags
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from tests.integration_tests.reports.utils import insert_report_schedule
label_desc: Use image node_id 32 for calling the TestReportSchedulesApi obj's underlying member method code with example usage: obj.test_update_report_schedule() without return types