Budget app - first test case issue

I’m having trouble with the first test case. The printed string is exactly as the test case but the AssertionError seems to be detecting the open “{” only. Thanks!!

Link to code: https://replit.com/@palebluedot1/boilerplate-budget-app#budget.py

{"amount": 1000, "description": "initial deposit"}
{"amount": 900, "description": "deposit"}
F
======================================================================
FAIL: test_deposit (test_module.UnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Coding\python-workspace\FCC-Python-Cert\budget-app\test_module.py", line 16, in test_deposit
    self.assertEqual(
AssertionError: '{' != {'amount': 900, 'description': 'deposit'} : Expected `deposit` method to create a specific object in the ledger instance variable.

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (failures=1)

ledger is expected to be a list with dictionaries (objects), not a string.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.