Skip to content

Commit

Permalink
fix: flaky test_explore_json_async test v2 (#26106)
Browse files Browse the repository at this point in the history
(cherry picked from commit 91a8b69)
  • Loading branch information
villebro authored and michael-s-molina committed Dec 4, 2023
1 parent 00db4df commit a3212cc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/integration_tests/core_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,10 +840,16 @@ def test_explore_json_async(self):
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(
Expand Down

0 comments on commit a3212cc

Please sign in to comment.