Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed May 3, 2023
1 parent 2f67f48 commit 5543be7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/integration_tests/explore/permalink/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# specific language governing permissions and limitations
# under the License.
import json
import pickle
from typing import Any, Dict, Iterator
from uuid import uuid3

Expand All @@ -24,7 +23,7 @@

from superset import db
from superset.key_value.models import KeyValueEntry
from superset.key_value.types import KeyValueResource
from superset.key_value.types import JsonKeyValueCodec, KeyValueResource
from superset.key_value.utils import decode_permalink_id, encode_permalink_key
from superset.models.slice import Slice
from superset.utils.core import DatasourceType
Expand Down Expand Up @@ -95,7 +94,7 @@ def test_get_missing_chart(
chart_id = 1234
entry = KeyValueEntry(
resource=KeyValueResource.EXPLORE_PERMALINK,
value=pickle.dumps(
value=JsonKeyValueCodec().encode(
{
"chartId": chart_id,
"datasourceId": chart.datasource.id,
Expand Down
1 change: 1 addition & 0 deletions tests/integration_tests/key_value/commands/create_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from superset.key_value.exceptions import KeyValueCreateFailedError
from superset.utils.core import override_user
from tests.integration_tests.key_value.commands.fixtures import (
admin,
JSON_CODEC,
JSON_VALUE,
PICKLE_CODEC,
Expand Down
1 change: 1 addition & 0 deletions tests/integration_tests/key_value/commands/get_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
ID_KEY,
JSON_CODEC,
JSON_VALUE,
key_value_entry,
RESOURCE,
UUID_KEY,
)
Expand Down
2 changes: 2 additions & 0 deletions tests/integration_tests/key_value/commands/update_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
from superset.extensions import db
from superset.utils.core import override_user
from tests.integration_tests.key_value.commands.fixtures import (
admin,
ID_KEY,
JSON_CODEC,
key_value_entry,
RESOURCE,
UUID_KEY,
)
Expand Down
2 changes: 2 additions & 0 deletions tests/integration_tests/key_value/commands/upsert_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
from superset.extensions import db
from superset.utils.core import override_user
from tests.integration_tests.key_value.commands.fixtures import (
admin,
ID_KEY,
JSON_CODEC,
key_value_entry,
RESOURCE,
UUID_KEY,
)
Expand Down

0 comments on commit 5543be7

Please sign in to comment.