From 24cf32ab6bbead3dcc4da299da494b872cd8d164 Mon Sep 17 00:00:00 2001 From: Eugene Molotov Date: Sat, 10 Aug 2024 21:24:39 +0500 Subject: [PATCH] fixup! fixup! fixup! fixup! fixup! fixup! fixup! Adapt to redis 3.* --- python/minqlx/database.py | 3 --- python/tests/test_database.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/python/minqlx/database.py b/python/minqlx/database.py index e5373da..abffaa7 100644 --- a/python/minqlx/database.py +++ b/python/minqlx/database.py @@ -319,9 +319,6 @@ def close(self): Redis._pool = None if redis.VERSION > (3,): - def setex(self, name, time, value): - return self.r.setex(name, value, time) - def zincrby(self, name, value, amount=1): return self.r.zincrby(name, amount, value) diff --git a/python/tests/test_database.py b/python/tests/test_database.py index a27acf5..9109c4c 100644 --- a/python/tests/test_database.py +++ b/python/tests/test_database.py @@ -100,7 +100,7 @@ def test_setex_01(self): test_value = "test value" timeout = 1 - c.setex(key, test_value, timeout) + c.setex(key, timeout, test_value) self.assertEqual(c.get(key), test_value, "Too small timeout value?") sleep(timeout + 0.5) self.assertEqual(c.get(key), None)