docstr: In a clustered redis, the script keys must be in the same slot.
  
  This test isn't very interesting for standalone redis, but it doesn't
  hurt anything.
docstr_tok: ["In","a","clustered","redis",",","the","script","keys","must","be","in","the","same","slot",".","This","test","is","n't","very","interesting","for","standalone","redis",",","but","it","doesn't","hurt","anything","."]
code: def test_eval_same_slot(self, r):
      """
      In a clustered redis, the script keys must be in the same slot.
  
      This test isn't very interesting for standalone redis, but it doesn't
      hurt anything.
      """
      r.set("A{foo}", 2)
      r.set("B{foo}", 4)
      # 2 * 4 == 8
  
      script = """
          local value = redis.call('GET', KEYS[1])
          local value2 = redis.call('GET', KEYS[2])
          return value * value2
          """
      result = r.eval(script, 2, "A{foo}", "B{foo}")
      assert result == 8
  
imports: import pytest
  import redis
  from redis import exceptions
  from redis.commands.core import Script
  from tests.conftest import skip_if_redis_enterprise, skip_if_server_version_lt
label_desc: Use image node_id 5 for calling the TestScripting obj's underlying member method code with example usage: obj.test_eval_same_slot(r) without return types