diff options
-rw-r--r-- | redis/commands/core.py | 9 | ||||
-rw-r--r-- | tests/test_commands.py | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py index 80eb8e8..99bf14d 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -315,6 +315,15 @@ class ManagementCommands: Redis management commands """ + def auth(self): + """ + This function throws a NotImplementedError since it is intentionally + not supported. + """ + raise NotImplementedError( + "AUTH is intentionally not implemented in the client." + ) + def bgrewriteaof(self, **kwargs): """Tell the Redis server to rewrite the AOF file from data in memory. diff --git a/tests/test_commands.py b/tests/test_commands.py index a2d9335..6ee204b 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -71,6 +71,10 @@ class TestRedisCommands: r["a"] # SERVER INFORMATION + def test_auth_not_implemented(self, r): + with pytest.raises(NotImplementedError): + r.auth() + @skip_if_server_version_lt("6.0.0") def test_acl_cat_no_category(self, r): categories = r.acl_cat() |