diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-09-01 17:31:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 17:31:55 +0300 |
commit | e9837c1d6360d27fac0d8fed6384fd9b2b568b5c (patch) | |
tree | 5c50d4995122b9893a3ab68b637362067b6fd70f /tests/test_scripting.py | |
parent | 42a050c6c0d120104c7433e825e7a798ba411e55 (diff) | |
download | redis-py-e9837c1d6360d27fac0d8fed6384fd9b2b568b5c.tar.gz |
Support for SCRIPT FLUSH with SYNC/ASYNC (#1567)
Part of #1546
Diffstat (limited to 'tests/test_scripting.py')
-rw-r--r-- | tests/test_scripting.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_scripting.py b/tests/test_scripting.py index 02c0f17..cc67e26 100644 --- a/tests/test_scripting.py +++ b/tests/test_scripting.py @@ -30,6 +30,24 @@ class TestScripting: # 2 * 3 == 6 assert r.eval(multiply_script, 1, 'a', 3) == 6 + def test_script_flush(self, r): + r.set('a', 2) + r.script_load(multiply_script) + r.script_flush('ASYNC') + + r.set('a', 2) + r.script_load(multiply_script) + r.script_flush('SYNC') + + r.set('a', 2) + r.script_load(multiply_script) + r.script_flush() + + with pytest.raises(exceptions.DataError): + r.set('a', 2) + r.script_load(multiply_script) + r.script_flush("NOTREAL") + def test_evalsha(self, r): r.set('a', 2) sha = r.script_load(multiply_script) |