mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
PackageComment: default RenderedComment to str()
With this, `bool(PackageComment.RenderedComment) == False` Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
13b4dbf541
commit
c05fafea0e
2 changed files with 7 additions and 9 deletions
|
@ -56,8 +56,9 @@ def test_package_comment_null_comments_raises_exception():
|
|||
rollback()
|
||||
|
||||
|
||||
def test_package_comment_null_renderedcomment_raises_exception():
|
||||
with pytest.raises(IntegrityError):
|
||||
create(PackageComment, PackageBase=pkgbase, User=user,
|
||||
Comments="Test comment.")
|
||||
rollback()
|
||||
def test_package_comment_null_renderedcomment_defaults():
|
||||
record = create(PackageComment,
|
||||
PackageBase=pkgbase,
|
||||
User=user,
|
||||
Comments="Test comment.")
|
||||
assert record.RenderedComment == str()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue