code: def test_get_dashboard_view__public_user_with_dashboard_permission_can_not_access_draft(
      self,
  ):
      # arrange
      dashboard_to_access = create_dashboard_to_db(published=False)
      grant_access_to_dashboard(dashboard_to_access, "Public")
      self.logout()
      # act
      response = self.get_dashboard_view_response(dashboard_to_access)
  
      # assert
      assert response.status_code == 302
  
      # post
      revoke_access_to_dashboard(dashboard_to_access, "Public")
  
imports: import json
  from unittest import mock
  from unittest.mock import patch
  import pytest
  from superset.commands.dashboard.exceptions import DashboardForbiddenError
  from superset.daos.dashboard import DashboardDAO
  from superset.utils.core import backend, override_user
  from tests.integration_tests.conftest import with_feature_flags
  from tests.integration_tests.dashboards.dashboard_test_utils import *
  from tests.integration_tests.dashboards.security.base_case import BaseTestDashboardSecurity
  from tests.integration_tests.dashboards.superset_factory_util import create_dashboard_to_db, create_database_to_db, create_datasource_table_to_db, create_slice_to_db
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from tests.integration_tests.fixtures.public_role import public_role_like_gamma
  from tests.integration_tests.fixtures.query_context import get_query_context
  from tests.integration_tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices, load_world_bank_data
label_desc: Use image node_id 9 for calling the TestDashboardRoleBasedSecurity obj's underlying member method code with example usage: obj.test_get_dashboard_view__public_user_with_dashboard_permission_can_not_access_draft() without return types