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/01/13 23:25:14 UTC

[GitHub] [incubator-superset] suddjian commented on a change in pull request #8941: [dashboards] New, export api

suddjian commented on a change in pull request #8941: [dashboards] New, export api
URL: https://github.com/apache/incubator-superset/pull/8941#discussion_r366082463
 
 

 ##########
 File path: tests/dashboard_api_tests.py
 ##########
 @@ -423,3 +423,40 @@ def test_get_related_fail(self):
 
         rv = self.client.get(uri)
         self.assertEqual(rv.status_code, 404)
+
+    def test_export(self):
+        """
+            Dashboard API: Test dashboard export
+        """
+        self.login(username="admin")
+        argument = [1, 2]
+        uri = f"api/v1/dashboard/export/?q={prison.dumps(argument)}"
+
+        rv = self.client.get(uri)
+        self.assertEqual(rv.status_code, 200)
+        rv.headers["Content-Disposition"] = 'attachment; filename="dashboards.json"'
 
 Review comment:
   Is this line supposed to be asserting something?

----------------------------------------------------------------
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