add test for error: none in description

This commit is contained in:
Flukx 2020-12-20 18:26:56 +00:00
parent 2c649072f9
commit 88ec7fdbc9

View file

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