Skip to content

Commit

Permalink
remove data asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurnewase committed Nov 26, 2022
1 parent 0cb66fd commit e8802b9
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions tests/integration_tests/charts/data/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,24 +900,17 @@ def test_chart_data_get_forced(self):
}
)

self.get_assert_metric(f"api/v1/chart/{chart.id}/data/", "get_data")
self.get_assert_metric(f"api/v1/chart/{chart.id}/data/?force=true", "get_data")

# should burst cache
rv = self.get_assert_metric(
f"api/v1/chart/{chart.id}/data/?force=true", "get_data"
)

data = json.loads(rv.data.decode("utf-8"))
assert rv.json["result"][0]["is_cached"] is None
assert rv.mimetype == "application/json"
assert data["result"][0]["status"] == "success"
assert data["result"][0]["rowcount"] == 2

# should get response from the cache
rv = self.get_assert_metric(f"api/v1/chart/{chart.id}/data/", "get_data")
data = json.loads(rv.data.decode("utf-8"))
assert rv.json["result"][0]["is_cached"] is not None
assert rv.mimetype == "application/json"
assert data["result"][0]["status"] == "success"
assert data["result"][0]["rowcount"] == 2
assert rv.json["result"][0]["is_cached"]

@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
@with_feature_flags(GLOBAL_ASYNC_QUERIES=True)
Expand Down

0 comments on commit e8802b9

Please sign in to comment.