mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(metastore-cache): import dao in methods (#29451)
This commit is contained in:
@@ -18,13 +18,14 @@ from __future__ import annotations
|
||||
|
||||
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 @@ from superset.key_value.types import (
|
||||
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 @@ SECOND_VALUE = "qwerty"
|
||||
|
||||
@pytest.fixture
|
||||
def cache() -> SupersetMetastoreCache:
|
||||
from superset.extensions.metastore_cache import SupersetMetastoreCache
|
||||
|
||||
return SupersetMetastoreCache(
|
||||
namespace=NAMESPACE,
|
||||
default_timeout=600,
|
||||
|
||||
Reference in New Issue
Block a user