feat: add GET /api/v1/chart/{chart_id}/data/?format{format} API (#15827)

* feat: add `GET /api/v1/chart/{chart_id}/data/?format{format}` API

* Fix test
This commit is contained in:
Beto Dealmeida
2021-07-21 17:03:22 -07:00
committed by GitHub
parent 3441182630
commit f104fba61d
3 changed files with 213 additions and 57 deletions

View File

@@ -90,7 +90,7 @@ class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
response = self.get_dashboard_view_response(dashboard_to_access)
request_payload = get_query_context("birth_names")
rv = self.post_assert_metric(CHART_DATA_URI, request_payload, "data")
rv = self.post_assert_metric(CHART_DATA_URI, request_payload, "post_data")
self.assertEqual(rv.status_code, 401)
# assert
@@ -140,7 +140,7 @@ class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
self.assert200(response)
request_payload = get_query_context("birth_names")
rv = self.post_assert_metric(CHART_DATA_URI, request_payload, "data")
rv = self.post_assert_metric(CHART_DATA_URI, request_payload, "post_data")
self.assertEqual(rv.status_code, 200)
# post