Add __repr__ to models

This commit is contained in:
Patrick Smith
2018-09-26 16:50:10 -04:00
committed by Montana
parent 74a5a59dad
commit 8bb9c1ab8a
19 changed files with 123 additions and 0 deletions

View File

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

View File

@@ -16,3 +16,7 @@ def test_add_user_to_environment():
dev_environment = Environments.add_member(dev_environment, developer, "developer")
assert developer in dev_environment.users
def test_repr():
pass