| 43 | |
| 44 | @pytest.mark.redismod |
| 45 | async def test_bf_add(decoded_r: redis.Redis): |
| 46 | assert await decoded_r.bf().create("bloom", 0.01, 1000) |
| 47 | assert 1 == await decoded_r.bf().add("bloom", "foo") |
| 48 | assert 0 == await decoded_r.bf().add("bloom", "foo") |
| 49 | assert [0] == intlist(await decoded_r.bf().madd("bloom", "foo")) |
| 50 | assert [0, 1] == await decoded_r.bf().madd("bloom", "foo", "bar") |
| 51 | assert [0, 0, 1] == await decoded_r.bf().madd("bloom", "foo", "bar", "baz") |
| 52 | assert 1 == await decoded_r.bf().exists("bloom", "foo") |
| 53 | assert 0 == await decoded_r.bf().exists("bloom", "noexist") |
| 54 | assert [1, 0] == intlist(await decoded_r.bf().mexists("bloom", "foo", "noexist")) |
| 55 | |
| 56 | |
| 57 | @pytest.mark.redismod |