Add __repr__ to models
This commit is contained in:
@@ -16,3 +16,9 @@ def test_attach_raises():
|
||||
fs = FileStorage(fp, content_type="something/else")
|
||||
with pytest.raises(AttachmentError):
|
||||
Attachment.attach(fs)
|
||||
|
||||
|
||||
def test_repr(pdf_upload):
|
||||
attachment = Attachment.attach(pdf_upload)
|
||||
assert attachment.filename in str(attachment)
|
||||
assert str(attachment.id) in str(attachment)
|
||||
|
Reference in New Issue
Block a user