Add all_pks() method to HashModel
This commit is contained in:
parent
db7b8d19ad
commit
bc441143de
3 changed files with 19 additions and 1 deletions
|
@ -411,6 +411,12 @@ def test_sorting(members, m):
|
|||
m.Member.find().sort_by("join_date").all()
|
||||
|
||||
|
||||
def test_all_keys(members, m):
|
||||
pks = sorted(list(m.Member.all_pks()))
|
||||
assert len(pks) == 3
|
||||
assert pks == sorted([m.pk for m in members])
|
||||
|
||||
|
||||
def test_not_found(m):
|
||||
with pytest.raises(NotFoundError):
|
||||
# This ID does not exist.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue