class_docstr: Guest users should only have access to datasources that are associated with a
  dashboard they have access to, and only with that dashboard context present
code: def test_raise_for_access__no_chart_in_form_data(self):
      g.user = self.authorized_guest
      for kwarg in ["viz", "query_context"]:
          with self.assertRaises(SupersetSecurityException):
              security_manager.raise_for_access(
                  **{
                      kwarg: Mock(
                          datasource=self.datasource,
                          form_data={
                              "dashboardId": self.dash.id,
                          },
                      )
                  }
              )
  
imports: import json
  from unittest.mock import Mock, patch
  import pytest
  from flask import g
  from superset import db, security_manager
  from superset.connectors.sqla.models import SqlaTable
  from superset.daos.dashboard import EmbeddedDashboardDAO
  from superset.exceptions import SupersetSecurityException
  from superset.models.dashboard import Dashboard
  from superset.security.guest_token import GuestTokenResourceType
  from superset.sql_parse import Table
  from superset.utils.core import get_example_default_schema
  from superset.utils.database import get_example_database
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices_class_scope, load_birth_names_data
  from tests.integration_tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices, load_world_bank_dashboard_with_slices_class_scope, load_world_bank_data
label_desc: Use image node_id 6 for calling the TestGuestUserDatasourceAccess obj's underlying member method code with example usage: obj.test_raise_for_access__no_chart_in_form_data() without return types