You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/04/17 09:28:43 UTC

[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #9556: chore: Add OpenAPI docs to /api/v1/chart/data EP

dpgaspar commented on a change in pull request #9556: chore: Add OpenAPI docs to /api/v1/chart/data EP
URL: https://github.com/apache/incubator-superset/pull/9556#discussion_r410103621
 
 

 ##########
 File path: tests/charts/api_tests.py
 ##########
 @@ -659,6 +659,17 @@ def test_chart_data(self):
         data = json.loads(rv.data.decode("utf-8"))
         self.assertEqual(data[0]["rowcount"], 100)
 
+    def test_invalid_chart_data(self):
+        """
+            Query API: Test chart data query
+        """
+        self.login(username="admin")
+        query_context = self._get_query_context()
+        query_context["datasource"] = "abc"
+        uri = "api/v1/chart/data"
+        rv = self.client.post(uri, json=query_context)
+        self.assertEqual(rv.status_code, 400)
 
 Review comment:
   Tests look a bit thin, maybe add a bunch of tests related with required fields and one with an non existent datasource

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org