Test embedded Model.DoesNotExist error
This commit is contained in:
parent
ef58e854c1
commit
b80addbb13
2 changed files with 15 additions and 14 deletions
|
@ -310,6 +310,12 @@ def test_sorting(members):
|
|||
Member.find().sort_by('join_date').all()
|
||||
|
||||
|
||||
def test_not_found():
|
||||
with pytest.raises(Member.NotFoundError):
|
||||
# This ID does not exist.
|
||||
Member.get(1000)
|
||||
|
||||
|
||||
def test_schema():
|
||||
class Address(BaseHashModel):
|
||||
a_string: str = Field(index=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue