fix: Flaky test_explore_json_async test (#26059)

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
(cherry picked from commit 2b88225ee1)
This commit is contained in:
Michael S. Molina
2023-11-22 09:11:09 -03:00
committed by Michael S. Molina
parent ff5de25478
commit ea65c2467c

View File

@@ -839,7 +839,8 @@ class TestCore(SupersetTestCase, InsertChartMixin):
data = json.loads(rv.data.decode("utf-8"))
keys = list(data.keys())
self.assertEqual(rv.status_code, 202)
# If chart is cached, it will return 200, otherwise 202
self.assertTrue(rv.status_code in {200, 202})
self.assertCountEqual(
keys, ["channel_id", "job_id", "user_id", "status", "errors", "result_url"]
)