mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
add fork dashboard function (#6588)
* add fork dashboard function * add test * fix --------- Co-authored-by: guyu <guyu@fordeal.com>
This commit is contained in:
@@ -151,6 +151,15 @@ class TestDashboardResourcePost(BaseTestCase):
|
||||
self.assertEqual(rv.json["name"], new_name)
|
||||
|
||||
|
||||
class TestDashboardForkResourcePost(BaseTestCase):
|
||||
def test_forks_a_dashboard(self):
|
||||
dashboard = self.factory.create_dashboard()
|
||||
|
||||
rv = self.make_request("post", "/api/dashboards/{}/fork".format(dashboard.id))
|
||||
|
||||
self.assertEqual(rv.status_code, 200)
|
||||
|
||||
|
||||
class TestDashboardResourceDelete(BaseTestCase):
|
||||
def test_delete_dashboard(self):
|
||||
d = self.factory.create_dashboard()
|
||||
|
||||
Reference in New Issue
Block a user