test for the report

Kwame Asante 1 year ago
parent 8991dbd6a2 commit c50c124ce0c564cfe27c12dc05f3fa52b607c8a2
1 changed files with 6 additions and 0 deletions
+6-0test_budget.py ADDED
View File
@@ -0,0 +1,6 @@
1+from budget import report
2+
3+
4+def test_report(capsys):
5+ report([{"category": "food", "amount": 3.5}, {"category": "food", "amount": 1.5}])
6+ assert "5.00" in capsys.readouterr().out