summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-03-11 05:59:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-03-11 05:59:22 +0000
commit770359ab1b5d6d8421ee93ca9fdc7d044e0a1c78 (patch)
treecef8737b15ced6cfadaa45b0d758a3c0cf764da1 /tests
parentReleasing progress-linux version 1.11.0-1. (diff)
downloadiredis-770359ab1b5d6d8421ee93ca9fdc7d044e0a1c78.tar.xz
iredis-770359ab1b5d6d8421ee93ca9fdc7d044e0a1c78.zip
Merging upstream version 1.11.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_client.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unittests/test_client.py b/tests/unittests/test_client.py
index b40fc8b..f27587b 100644
--- a/tests/unittests/test_client.py
+++ b/tests/unittests/test_client.py
@@ -11,6 +11,7 @@ from iredis.config import config, load_config_files
from iredis.completers import IRedisCompleter
from iredis.entry import Rainbow, prompt_message
from iredis.exceptions import NotSupport
+from iredis.commands import command2syntax
from ..helpers import formatted_text_rematch
@@ -508,3 +509,15 @@ def test_reissue_command_on_redis_cluster_with_password_in_dsn(
print(call_args)
assert list(call_args[1:]) == ["set", "foo", "bar"]
assert call_args[0].password == "bar"
+
+
+def test_version_parse(iredis_client):
+ """
+ fix: https://github.com/laixintao/iredis/issues/418
+ """
+ iredis_client.auth_compat("6.1.0")
+ assert command2syntax["AUTH"] == "command_usernamex_password"
+ iredis_client.auth_compat("5.0")
+ assert command2syntax["AUTH"] == "command_password"
+ iredis_client.auth_compat("5.0.14.1")
+ assert command2syntax["AUTH"] == "command_password"