fix(examples): calendar chart metric should be metrics (#15173)

* fix(examples): calendar chart metric should be metrics

* fix presto test
This commit is contained in:
Ville Brofeldt 2021-06-17 14:55:50 +03:00 committed by GitHub
parent 7237324983
commit 1269cc2f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -69,7 +69,7 @@ def load_random_time_series_data(
"row_limit": config["ROW_LIMIT"],
"since": "2019-01-01",
"until": "2019-02-01",
"metric": "count",
"metrics": ["count"],
"viz_type": "cal_heatmap",
"domain_granularity": "month",
"subdomain_granularity": "day",

View File

@ -37,6 +37,7 @@ from superset.models.dashboard import Dashboard
from superset.models.core import FavStar, FavStarClassName
from superset.models.reports import ReportSchedule, ReportScheduleType
from superset.models.slice import Slice
from superset.utils.core import backend
from superset.views.base import generate_download_headers
from tests.base_api_tests import ApiOwnersTestCaseMixin
@ -182,7 +183,8 @@ class TestDashboardApi(SupersetTestCase, ApiOwnersTestCaseMixin, InsertChartMixi
result = data["result"]
actual_dataset_ids = set([dataset["id"] for dataset in result])
self.assertEqual(actual_dataset_ids, expected_dataset_ids)
self.assertEqual(result[0]["column_types"], [0, 1, 2])
expected_values = [0, 1] if backend() == "presto" else [0, 1, 2]
self.assertEqual(result[0]["column_types"], expected_values)
@pytest.mark.usefixtures("load_world_bank_dashboard_with_slices")
def test_get_dashboard_datasets_not_found(self):