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 2022/08/29 19:22:05 UTC

[GitHub] [superset] hughhhh commented on a diff in pull request #21125: chore: update status for datasource not found

hughhhh commented on code in PR #21125:
URL: https://github.com/apache/superset/pull/21125#discussion_r957713071


##########
tests/integration_tests/datasource_tests.py:
##########
@@ -402,10 +402,13 @@ def test_get_datasource_failed(self):
             DatasourceNotFound,
             lambda: DatasourceDAO.get_datasource(db.session, "table", 9999999),
         )
-
+        # assert rv.status_code == 404

Review Comment:
   remove this



##########
tests/integration_tests/datasource_tests.py:
##########
@@ -402,10 +402,13 @@ def test_get_datasource_failed(self):
             DatasourceNotFound,
             lambda: DatasourceDAO.get_datasource(db.session, "table", 9999999),
         )
-
+        # assert rv.status_code == 404
         self.login(username="admin")
-        resp = self.get_json_resp("/datasource/get/table/500000/", raise_on_error=False)
-        self.assertEqual(resp.get("error"), "Datasource does not exist")
+        self.get_json_resp("/datasource/get/table/500000/", raise_on_error=True)
+        with self.assertRaises(Exception) as ex:
+            # assert rv.status_code == 404

Review Comment:
   remove this



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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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