summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 60e667d..76322d7 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -1006,6 +1006,14 @@ class TestRedisCommands:
assert r.get('a') == b'2'
assert 0 < r.ttl('a') <= 10
+ @skip_if_server_version_lt('6.2.0')
+ def test_set_get(self, r):
+ assert r.set('a', 'True', get=True) is None
+ assert r.set('a', 'True', get=True) == b'True'
+ assert r.set('a', 'foo') is True
+ assert r.set('a', 'bar', get=True) == b'foo'
+ assert r.get('a') == b'bar'
+
def test_setex(self, r):
assert r.setex('a', 60, '1')
assert r['a'] == b'1'