fix: flaky test_explore_json_async test v2 (#26106)

This commit is contained in:
Ville Brofeldt 2023-11-28 05:21:13 -08:00 committed by GitHub
parent d20f96f8d0
commit 91a8b69d36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -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(