You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by aa...@apache.org on 2023/01/12 17:41:36 UTC

[superset] 01/01: chart deletion test

This is an automated email from the ASF dual-hosted git repository.

aafghahi pushed a commit to branch arash.afghahi/sc-62626/chart-and-dataset-deletion-operation-might
in repository https://gitbox.apache.org/repos/asf/superset.git

commit cd458d597e3b85812336117b60bdc8312c8900ff
Author: AAfghahi <ar...@gmail.com>
AuthorDate: Thu Jan 12 12:41:02 2023 -0500

    chart deletion test
---
 tests/integration_tests/charts/api_tests.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/integration_tests/charts/api_tests.py b/tests/integration_tests/charts/api_tests.py
index 63f530ffa9..1a00865a62 100644
--- a/tests/integration_tests/charts/api_tests.py
+++ b/tests/integration_tests/charts/api_tests.py
@@ -32,7 +32,7 @@ from superset.extensions import cache_manager, db
 from superset.models.core import Database, FavStar, FavStarClassName
 from superset.models.dashboard import Dashboard
 from superset.reports.models import ReportSchedule, ReportScheduleType
-from superset.models.slice import Slice
+from superset.models.slice import Slice, slice_user
 from superset.utils.core import get_example_default_schema
 
 from tests.integration_tests.base_api_tests import ApiOwnersTestCaseMixin
@@ -228,7 +228,9 @@ class TestChartApi(SupersetTestCase, ApiOwnersTestCaseMixin, InsertChartMixin):
         rv = self.delete_assert_metric(uri, "delete")
         self.assertEqual(rv.status_code, 200)
         model = db.session.query(Slice).get(chart_id)
+        slice_user = db.session.query(slice_user).get(admin_id)
         self.assertEqual(model, None)
+        self.assertEqual(slice_user, None)
 
     def test_delete_bulk_charts(self):
         """