mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix: Refactor ownership checks and ensure consistency (#20499)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
@@ -109,7 +109,7 @@ class TestCreatePermalinkDataCommand(SupersetTestCase):
|
||||
|
||||
datasource = f"{dataset.id}__{DatasourceType.TABLE}"
|
||||
command = CreateExplorePermalinkCommand(
|
||||
mock_g.user, {"formData": {"datasource": datasource, "slice_id": slice.id}}
|
||||
{"formData": {"datasource": datasource, "slice_id": slice.id}}
|
||||
)
|
||||
|
||||
assert isinstance(command.run(), str)
|
||||
@@ -130,10 +130,10 @@ class TestCreatePermalinkDataCommand(SupersetTestCase):
|
||||
datasource = f"{dataset.id}__{DatasourceType.TABLE}"
|
||||
|
||||
key = CreateExplorePermalinkCommand(
|
||||
mock_g.user, {"formData": {"datasource": datasource, "slice_id": slice.id}}
|
||||
{"formData": {"datasource": datasource, "slice_id": slice.id}}
|
||||
).run()
|
||||
|
||||
get_command = GetExplorePermalinkCommand(mock_g.user, key)
|
||||
get_command = GetExplorePermalinkCommand(key)
|
||||
cache_data = get_command.run()
|
||||
|
||||
assert cache_data.get("datasource") == datasource
|
||||
@@ -166,7 +166,7 @@ class TestCreatePermalinkDataCommand(SupersetTestCase):
|
||||
"formData": {"datasource": datasource_string, "slice_id": slice.id}
|
||||
},
|
||||
}
|
||||
get_command = GetExplorePermalinkCommand(mock_g.user, "thisisallmocked")
|
||||
get_command = GetExplorePermalinkCommand("thisisallmocked")
|
||||
cache_data = get_command.run()
|
||||
|
||||
assert cache_data.get("datasource") == datasource_string
|
||||
|
||||
Reference in New Issue
Block a user