add test for error: none in description
This commit is contained in:
parent
2c649072f9
commit
88ec7fdbc9
1 changed files with 13 additions and 1 deletions
|
@ -60,9 +60,21 @@ class TestTable:
|
|||
assert any(["10.00" in cell.content for cell in row_content])
|
||||
assert any(["2020-08-07" in cell.content for cell in row_content])
|
||||
assert "Buying food" in [cell.content for cell in row_content]
|
||||
assert "2020-10-01" in [cell.content for cell in row_content]
|
||||
assert transaction.post_date.isoformat() in [cell.content for cell in row_content]
|
||||
assert "number" in [cell.format for cell in row_content]
|
||||
|
||||
def test_none_description(self, splits):
|
||||
"""Test everything works fine with a transaction description that is None.
|
||||
|
||||
It choked once on it. So turned it into a test case."""
|
||||
book, _, _, transaction = splits
|
||||
transaction.description = None
|
||||
book.save()
|
||||
table = overview_table.Table(book)
|
||||
html = table.to_html()
|
||||
assert len(html) > 0
|
||||
assert "<td" in html # not removed the line completely
|
||||
|
||||
def test_doubled_account_in_to_row_content(self, splits):
|
||||
"""Test if data for single row includes error message.
|
||||
|
||||
|
|
Loading…
Reference in a new issue