-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/v1.10.1/random import generic commands mixin (#136)
* Fix import used in GenericCommandsMixin.randomkey * Bump pyproject version to 1.10.2
- Loading branch information
Showing
3 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
def test_randomkey_returns_none_on_empty_db(r): | ||
assert r.randomkey() is None | ||
|
||
|
||
def test_randomkey_returns_existing_key(r): | ||
r.set("foo", 1) | ||
r.set("bar", 2) | ||
r.set("baz", 3) | ||
assert r.randomkey().decode() in ("foo", "bar", "baz") |