fix(learn): update README for check_funds to match test (#2)

* fix: update test for check_funds

* fix: revert test_check_funds and update readme

* fix: fixed accidental whitespace changes
This commit is contained in:
Amy Surrett 2020-10-28 02:25:36 -04:00 committed by GitHub
parent 29d066b6bc
commit ce3fc33235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ Complete the `Category` class in `budget.py`. It should be able to instantiate o
* A `withdraw` method that is similar to the `deposit` method, but the amount passed in should be stored in the ledger as a negative number. If there are not enough funds, nothing should be added to the ledger. This method should return `True` if the withdrawal took place, and `False` otherwise.
* A `get_balance` method that returns the current balance of the budget category based on the deposits and withdrawals that have occurred.
* A `transfer` method that accepts an amount and another budget category as arguments. The method should add a withdrawal with the amount and the description "Transfer to [Destination Budget Category]". The method should then add a deposit to the other budget category with the amount and the description "Transfer from [Source Budget Category]". If there are not enough funds, nothing should be added to either ledgers. This method should return `True` if the transfer took place, and `False` otherwise.
* A `check_funds` method that accepts an amount as an argument. It returns `False` if the amount is less than the balance of the budget category and returns `True` otherwise. This method should be used by both the `withdraw` method and `transfer` method.
* A `check_funds` method that accepts an amount as an argument. It returns `False` if the amount is greater than the balance of the budget category and returns `True` otherwise. This method should be used by both the `withdraw` method and `transfer` method.
When the budget object is printed it should display:
* A title line of 30 characters where the name of the category is centered in a line of `*` characters.