diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2019-12-28 14:02:13 -0800 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2019-12-28 22:23:43 -0800 |
commit | a34eac16e8c1595ff538883355e423152788bba6 (patch) | |
tree | c2f866444dc565a017d4adf0095e44beb727f4b5 | |
parent | 32effd4f391f79c1bb937fe55f6cb7a21f956160 (diff) | |
download | redis-py-a34eac16e8c1595ff538883355e423152788bba6.tar.gz |
Re-query acl data for user after acl_setuser
-rw-r--r-- | tests/test_commands.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py index 017b5af..04f1cd1 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -166,12 +166,15 @@ class TestRedisCommands(object): assert r.acl_setuser(username, enabled=True, remove_passwords=['pass2']) assert len(r.acl_getuser(username)['passwords']) == 1 + # Resets and tests that hashed values are set properly. hashed_password = ('5e884898da28047151d0e56f8dc629' '2773603d0d6aabbdd62a11ef721d1542d8') assert r.acl_setuser(username, enabled=True, reset=True, add_hashes=[hashed_password]) + acl = r.acl_getuser(username) assert acl['passwords'] == [hashed_password] + # test remove_passwords for hash removal assert r.acl_setuser(username, enabled=True, reset=True, add_hashes=[hashed_password], @@ -181,7 +184,7 @@ class TestRedisCommands(object): remove_hashes=[hashed_password]) assert len(r.acl_getuser(username)['passwords']) == 1 - @skip_if_server_version_lt('6.0.0') + @skip_if_server_version_lt('5.9.101') def test_acl_list(self, r, request): username = 'redis-py-user' |