From 91a8b69d365789833b6b9698df3b3ae95b34629e Mon Sep 17 00:00:00 2001 From: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Date: Tue, 28 Nov 2023 05:21:13 -0800 Subject: [PATCH] fix: flaky test_explore_json_async test v2 (#26106) --- tests/integration_tests/core_tests.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/integration_tests/core_tests.py b/tests/integration_tests/core_tests.py index 25f8e624e..c4a089733 100644 --- a/tests/integration_tests/core_tests.py +++ b/tests/integration_tests/core_tests.py @@ -714,10 +714,16 @@ class TestCore(SupersetTestCase): keys = list(data.keys()) # 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"] - ) + assert rv.status_code in {200, 202} + if rv.status_code == 202: + assert keys == [ + "channel_id", + "job_id", + "user_id", + "status", + "errors", + "result_url", + ] @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices") @mock.patch.dict(