summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordvora-h <67596500+dvora-h@users.noreply.github.com>2022-03-07 00:53:28 +0200
committerGitHub <noreply@github.com>2022-03-07 00:53:28 +0200
commit4dc48d610f009ad14ff19ec7fcc3ac5c960d9490 (patch)
treef4096ee0d8ca33ebd4dec168df2589d9f2256b3e
parentc4e408880c0fbfe714cd9ad4e1e6b908f00be9b5 (diff)
downloadredis-py-4dc48d610f009ad14ff19ec7fcc3ac5c960d9490.tar.gz
Implemented COMMAND DOCS by always throwing NotImplementedError (#2020)
* command docs * Add support for AUTH (#1929) * Add support for AUTH * Fix linter error * test fix * fix test in cluster Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: dvora-h <dvora.heller@redis.com> * Add support for JSON, TIMESERIES, BLOOM & GRAPH commands in cluster (#2032) Co-authored-by: Chayim <chayim@users.noreply.github.com> * Add support for HSET items (#2006) * Add `items` parameter to `hset` * Add test for `hset` with `items` * Update CHANGES * fix test_profile Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: dvora-h <dvora.heller@redis.com> * Add cluster support for functions (#2016) * cluster support for functions * fix test_list_on_cluster mark * fix mark * cluster unstable url * fix * fix cluster url * skip tests * linters * linters * skip test Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: dogukanteber <47397379+dogukanteber@users.noreply.github.com> Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: Marek Czaplicki <mdczaplicki@gmail.com>
-rw-r--r--redis/commands/core.py9
-rw-r--r--tests/test_commands.py5
2 files changed, 14 insertions, 0 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py
index 457b5c8..e9bb286 100644
--- a/redis/commands/core.py
+++ b/redis/commands/core.py
@@ -743,6 +743,15 @@ class ManagementCommands(CommandsProtocol):
def command_count(self, **kwargs) -> ResponseT:
return self.execute_command("COMMAND COUNT", **kwargs)
+ def command_docs(self, *args):
+ """
+ This function throws a NotImplementedError since it is intentionally
+ not supported.
+ """
+ raise NotImplementedError(
+ "COMMAND DOCS is intentionally not implemented in the client."
+ )
+
def config_get(self, pattern: PatternT = "*", **kwargs) -> ResponseT:
"""
Return a dictionary of configuration based on the ``pattern``
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 46303e5..f165120 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -4239,6 +4239,11 @@ class TestRedisCommands:
assert isinstance(res, int)
assert res >= 100
+ @skip_if_server_version_lt("7.0.0")
+ def test_command_docs(self, r):
+ with pytest.raises(NotImplementedError):
+ r.command_docs("set")
+
@pytest.mark.onlynoncluster
@skip_if_server_version_lt("2.8.13")
def test_command_getkeys(self, r):