diff --git a/tests/integration_tests/extensions/metastore_cache_test.py b/tests/integration_tests/extensions/metastore_cache_test.py index 6bfe6598e4f6..401c2f988bed 100644 --- a/tests/integration_tests/extensions/metastore_cache_test.py +++ b/tests/integration_tests/extensions/metastore_cache_test.py @@ -18,13 +18,14 @@ from contextlib import nullcontext from datetime import datetime, timedelta -from typing import Any, TYPE_CHECKING +from typing import Any from uuid import UUID import pytest from flask.ctx import AppContext from freezegun import freeze_time +from superset.extensions.metastore_cache import SupersetMetastoreCache from superset.key_value.exceptions import KeyValueCodecEncodeException from superset.key_value.types import ( JsonKeyValueCodec, @@ -32,9 +33,6 @@ PickleKeyValueCodec, ) -if TYPE_CHECKING: - from superset.extensions.metastore_cache import SupersetMetastoreCache - NAMESPACE = UUID("ee173d1b-ccf3-40aa-941c-985c15224496") FIRST_KEY = "foo" @@ -47,8 +45,6 @@ @pytest.fixture def cache() -> SupersetMetastoreCache: - from superset.extensions.metastore_cache import SupersetMetastoreCache - return SupersetMetastoreCache( namespace=NAMESPACE, default_timeout=600, @@ -56,10 +52,6 @@ def cache() -> SupersetMetastoreCache: ) -def test_instantiation(cache: SupersetMetastoreCache) -> None: - assert cache - - def test_caching_flow(app_context: AppContext, cache: SupersetMetastoreCache) -> None: assert cache.has(FIRST_KEY) is False assert cache.add(FIRST_KEY, FIRST_KEY_INITIAL_VALUE) is True