class_docstr: Testing Row Level Security
class_docstr_tok: ["Testing","Row","Level","Security"]
code: def test_get_rls_cache_key(self):
      g.user = self.get_user(username="admin")
      tbl = self.get_table(name="birth_names")
      clauses = security_manager.get_rls_cache_key(tbl)
      assert clauses == []
  
      g.user = self.get_user(username="gamma")
      clauses = security_manager.get_rls_cache_key(tbl)
      assert clauses == [
          "name like 'A%' or name like 'B%'-name",
          "name like 'Q%'-name",
          "gender = 'boy'-gender",
      ]
  
imports: import re
  from typing import Any, Optional
  from unittest import mock
  import pytest
  from flask import g
  import json
  import prison
  from superset import db, security_manager, app
  from superset.connectors.sqla.models import RowLevelSecurityFilter, SqlaTable
  from superset.security.guest_token import GuestTokenResourceType, GuestUser
  from flask_babel import lazy_gettext
  from flask_appbuilder.models.sqla import filters
  from ..conftest import with_config
  from ..base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from tests.integration_tests.fixtures.energy_dashboard import load_energy_table_with_slice, load_energy_table_data
  from tests.integration_tests.fixtures.unicode_dashboard import UNICODE_TBL_NAME, load_unicode_dashboard_with_slice, load_unicode_data
label_desc: Use image node_id 14 for calling the TestRowLevelSecurity obj's underlying member method code with example usage: obj.test_get_rls_cache_key() without return types