You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/24 14:46:16 UTC

[GitHub] [superset] michael-s-molina commented on a change in pull request #19324: feat: introduce hashids permalink keys

michael-s-molina commented on a change in pull request #19324:
URL: https://github.com/apache/superset/pull/19324#discussion_r834390844



##########
File path: tests/integration_tests/dashboards/permalink/api_tests.py
##########
@@ -48,15 +50,31 @@ def dashboard_id(load_world_bank_dashboard_with_slices) -> int:
         return dashboard.id
 
 
-def test_post(client, dashboard_id: int):
+@pytest.fixture
+def permalink_salt() -> Iterator[str]:
+    from superset.key_value.shared_entries import get_permalink_salt, get_uuid_namespace
+    from superset.key_value.types import SharedKey
+
+    key = SharedKey.DASHBOARD_PERMALINK_SALT
+    salt = get_permalink_salt(key)
+    yield salt
+    namespace = get_uuid_namespace(salt)
+    db.session.query(KeyValueEntry).filter_by(
+        resource="app", uuid=uuid3(namespace, key),

Review comment:
       Use `KeyValueResource` instead of "app"?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org