docstr: Ensure that deprecated fields are converted correctly
docstr_tok: ["Ensure","that","deprecated","fields","are","converted","correctly"]
code: def test_convert_deprecated_fields(self):
      """
      Ensure that deprecated fields are converted correctly
      """
      self.login(username="admin")
      payload = get_query_context("birth_names")
      columns = payload["queries"][0]["columns"]
      payload["queries"][0]["groupby"] = columns
      payload["queries"][0]["timeseries_limit"] = 99
      payload["queries"][0]["timeseries_limit_metric"] = "sum__num"
      del payload["queries"][0]["columns"]
      payload["queries"][0]["granularity_sqla"] = "timecol"
      payload["queries"][0]["having_filters"] = [
          {"col": "a", "op": "==", "val": "b"}
      ]
      query_context = ChartDataQueryContextSchema().load(payload)
      self.assertEqual(len(query_context.queries), 1)
      query_object = query_context.queries[0]
      self.assertEqual(query_object.granularity, "timecol")
      self.assertEqual(query_object.columns, columns)
      self.assertEqual(query_object.series_limit, 99)
      self.assertEqual(query_object.series_limit_metric, "sum__num")
  
imports: import re
  import time
  from typing import Any
  import numpy
  import pandas
  import pytest
  from pandas import DateOffset
  from superset import db
  from superset.charts.schemas import ChartDataQueryContextSchema
  from superset.common.chart_data import ChartDataResultFormat, ChartDataResultType
  from superset.common.query_context import QueryContext
  from superset.common.query_context_factory import QueryContextFactory
  from superset.common.query_object import QueryObject
  from superset.connectors.sqla.models import SqlMetric
  from superset.daos.datasource import DatasourceDAO
  from superset.extensions import cache_manager
  from superset.superset_typing import AdhocColumn
  from superset.utils.core import AdhocMetricExpressionType, backend, DatasourceType, QueryStatus
  from superset.utils.pandas_postprocessing.utils import FLAT_COLUMN_SEPARATOR
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.conftest import only_postgresql, only_sqlite
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from tests.integration_tests.fixtures.query_context import get_query_context
label_desc: Use image node_id 9 for calling the TestQueryContext obj's underlying member method code with example usage: obj.test_convert_deprecated_fields() without return types