diff --git a/redis/commands/core.py b/redis/commands/core.py index 73003e7fb6..36be0c14f4 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -314,6 +314,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 b28b63ea6e..9705f7cd3c 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -71,6 +71,10 @@ def test_command_on_invalid_key_type(self, r): 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()