From cdf03dfbcbae857bce67e3cbc44678ed324e5ecd Mon Sep 17 00:00:00 2001 From: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Date: Mon, 17 Oct 2022 10:40:42 +0100 Subject: [PATCH] chore(sqla): refactor query utils (#21811) Co-authored-by: Ville Brofeldt --- tests/integration_tests/charts/data/api_tests.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/integration_tests/charts/data/api_tests.py b/tests/integration_tests/charts/data/api_tests.py index bd6246b47d510..847c96970515e 100644 --- a/tests/integration_tests/charts/data/api_tests.py +++ b/tests/integration_tests/charts/data/api_tests.py @@ -1030,7 +1030,6 @@ def test_data_cache_default_timeout( assert rv.json["result"][0]["cache_timeout"] == 3456 -@pytest.mark.usefixtures("load_energy_table_with_slice") def test_chart_cache_timeout( test_client, login_as_admin, @@ -1069,7 +1068,9 @@ def test_chart_cache_timeout( }, }, ) -def test_chart_cache_timeout_not_present(login_as_admin, physical_query_context): +def test_chart_cache_timeout_not_present( + test_client, login_as_admin, physical_query_context +): # should use datasource cache, if it's present datasource: SqlaTable = ( @@ -1095,7 +1096,9 @@ def test_chart_cache_timeout_not_present(login_as_admin, physical_query_context) }, }, ) -def test_chart_cache_timeout_chart_not_found(login_as_admin, physical_query_context): +def test_chart_cache_timeout_chart_not_found( + test_client, login_as_admin, physical_query_context +): # should use default timeout physical_query_context["form_data"] = {"slice_id": 0} @@ -1116,6 +1119,7 @@ def test_chart_cache_timeout_chart_not_found(login_as_admin, physical_query_cont @with_feature_flags(ALLOW_ADHOC_SUBQUERY=False) @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices") def test_chart_data_subquery_not_allowed( + test_client, login_as_admin, physical_dataset, physical_query_context, @@ -1140,6 +1144,7 @@ def test_chart_data_subquery_not_allowed( @with_feature_flags(ALLOW_ADHOC_SUBQUERY=True) @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices") def test_chart_data_subquery_allowed( + test_client, login_as_admin, physical_dataset, physical_query_context,