From 69a494d03baa2fff21cce10a187b6eea75c5d51d Mon Sep 17 00:00:00 2001 From: valentino Date: Tue, 28 Aug 2018 18:40:07 +0200 Subject: [PATCH 1/3] Smembers From Redis Added --- RedisLibrary/RedisLibraryKeywords.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/RedisLibrary/RedisLibraryKeywords.py b/RedisLibrary/RedisLibraryKeywords.py index ffd2ff4..e6a9295 100644 --- a/RedisLibrary/RedisLibraryKeywords.py +++ b/RedisLibrary/RedisLibraryKeywords.py @@ -61,6 +61,19 @@ def get_from_redis(self, redis_conn, key): """ return redis_conn.get(key) + @keyword('Smembers From Redis') + def get_from_redis(self, redis_conn, key): + """ Get cached data from Redis + + Arguments: + - redis_conn: Redis connection object + - key: Set keyword to find. + + Examples: + | ${data}= | Get From Redis | ${redis_conn} | BARCODE:12345:67890 | + """ + return redis_conn.smembers(key) + @keyword('Get Dictionary From Redis Hash') def get_dict_from_redis_hash(self, redis_conn, name): """ Get cached data from Redis hashes From c56dafaad540d7fbeda5158e201390ede419b5e3 Mon Sep 17 00:00:00 2001 From: valentino Date: Tue, 28 Aug 2018 18:52:44 +0200 Subject: [PATCH 2/3] Fixed --- RedisLibrary/RedisLibraryKeywords.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RedisLibrary/RedisLibraryKeywords.py b/RedisLibrary/RedisLibraryKeywords.py index e6a9295..82dec0f 100644 --- a/RedisLibrary/RedisLibraryKeywords.py +++ b/RedisLibrary/RedisLibraryKeywords.py @@ -62,7 +62,7 @@ def get_from_redis(self, redis_conn, key): return redis_conn.get(key) @keyword('Smembers From Redis') - def get_from_redis(self, redis_conn, key): + def smembers_from_redis(self, redis_conn, key): """ Get cached data from Redis Arguments: From 07914a9630459549069a3c56bf3b54c5e10dd1f5 Mon Sep 17 00:00:00 2001 From: valentino Date: Wed, 29 Aug 2018 11:04:59 +0200 Subject: [PATCH 3/3] Doc and name fixed --- RedisLibrary/RedisLibraryKeywords.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RedisLibrary/RedisLibraryKeywords.py b/RedisLibrary/RedisLibraryKeywords.py index 82dec0f..914fb6e 100644 --- a/RedisLibrary/RedisLibraryKeywords.py +++ b/RedisLibrary/RedisLibraryKeywords.py @@ -61,16 +61,16 @@ def get_from_redis(self, redis_conn, key): """ return redis_conn.get(key) - @keyword('Smembers From Redis') - def smembers_from_redis(self, redis_conn, key): - """ Get cached data from Redis + @keyword('Get Set From Redis Set') + def get_set_from_redis_set(self, redis_conn, key): + """ Get cached members from Redis sets Arguments: - redis_conn: Redis connection object - key: Set keyword to find. Examples: - | ${data}= | Get From Redis | ${redis_conn} | BARCODE:12345:67890 | + | ${data}= | Get Set From Redis Set | ${redis_conn} | BARCODE:12345:67890 | """ return redis_conn.smembers(key)