Add all_pks() method to HashModel

This commit is contained in:
Andrew Brookins 2021-11-08 16:28:58 -08:00
parent db7b8d19ad
commit bc441143de
3 changed files with 19 additions and 1 deletions

View file

@ -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.