Skip to content

Saleor Core: the high performance, composable, headless commerce API.

observability settings shouldnt cause errors in introspection caching tests (#13469)

Filip Owczarekacfa63bd317c
diff --git a/saleor/graphql/core/tests/test_view.py b/saleor/graphql/core/tests/test_view.py
index 6a72109983..339da215e8 100644
--- a/saleor/graphql/core/tests/test_view.py
+++ b/saleor/graphql/core/tests/test_view.py
@@ -288,7 +288,7 @@ INTROSPECTION_RESULT = {"__schema": {"queryType": {"name": "Query"}}}
@mock.patch("saleor.graphql.views.cache.set")
@mock.patch("saleor.graphql.views.cache.get")
-@override_settings(DEBUG=False)
+@override_settings(DEBUG=False, OBSERVABILITY_REPORT_ALL_API_CALLS=False)
def test_introspection_query_is_cached(cache_get_mock, cache_set_mock, api_client):
cache_get_mock.return_value = None
cache_key = generate_cache_key(INTROSPECTION_QUERY)
@@ -303,7 +303,7 @@ def test_introspection_query_is_cached(cache_get_mock, cache_set_mock, api_clien
@mock.patch("saleor.graphql.views.cache.set")
@mock.patch("saleor.graphql.views.cache.get")
-@override_settings(DEBUG=False)
+@override_settings(DEBUG=False, OBSERVABILITY_REPORT_ALL_API_CALLS=False)
def test_introspection_query_is_cached_only_once(
cache_get_mock, cache_set_mock, api_client
):
@@ -318,7 +318,7 @@ def test_introspection_query_is_cached_only_once(
@mock.patch("saleor.graphql.views.cache.set")
@mock.patch("saleor.graphql.views.cache.get")
-@override_settings(DEBUG=True)
+@override_settings(DEBUG=True, OBSERVABILITY_REPORT_ALL_API_CALLS=False)
def test_introspection_query_is_not_cached_in_debug_mode(
cache_get_mock, cache_set_mock, api_client
):