We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae0011a commit c44ae96Copy full SHA for c44ae96
hypothesis-python/tests/redis/test_redis_exampledatabase.py
@@ -36,6 +36,18 @@ def test_invalid_args_raise(kw):
36
RedisExampleDatabase(**kw)
37
38
39
+def test_all_methods():
40
+ db = RedisExampleDatabase(FakeRedis())
41
+ db.save(b"key1", b"value")
42
+ assert list(db.fetch(b"key1")) == [b"value"]
43
+ db.move(b"key1", b"key2", b"value")
44
+ assert list(db.fetch(b"key1")) == []
45
+ assert list(db.fetch(b"key2")) == [b"value"]
46
+ db.delete(b"key2", b"value")
47
+ assert list(db.fetch(b"key2")) == []
48
+ db.delete(b"key2", b"unknown value")
49
+
50
51
class DatabaseComparison(RuleBasedStateMachine):
52
def __init__(self):
53
super().__init__()
0 commit comments