MCPcopy
hub / github.com/redis/redis-py / raise_error

Method raise_error

tests/test_cluster.py:4139–4143  ·  view source on GitHub ↗
(target_node, *args, **kwargs)

Source from the content-addressed store, hash-verified

4137 with patch("redis.cluster.get_connection") as get_connection:
4138
4139 def raise_error(target_node, *args, **kwargs):
4140 if get_connection.call_count == 2:
4141 raise ConnectionError("mocked error")
4142 else:
4143 return orig_func(target_node, *args, **kwargs)
4144
4145 get_connection.side_effect = raise_error
4146

Callers

nothing calls this directly

Calls 1

ConnectionErrorClass · 0.90

Tested by

no test coverage detected