Budget App operand error

Hello! Here my code for the budget app. my budgetapp
I get a type error: unsupported operand type(s) for -: ‘NoneType’ and ‘int’.
That means I used ‘-’ with an integer and a nonetype, right? Can’t figure out where though. I only have ‘-’ in withdraw method to convert a positive number to a negative. Please, help!

Hello!
It’s not in your code where that error is, it’s in the test
self.assertEqual(entertainment_balance_after - entertainment_balance_before, transfer_amount, 'Expected transfer method to increase balance in entertainment object.')

I think your get_balance method has no return value in one case, that’s why one of the operands is not a number.

thank you so much! it helped

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