def test_should_transfer_money_from_account_one_to_account_two(self): sender_account_id = bankTransfer.create_account('sender', 15) receiver_account_id = bankTransfer.create_account('receiver', 25) bankTransfer.transfer_money(sender_account_id, receiver_account_id, 10) sender_account_final_balance = bankTransfer.get_account( sender_account_id)['currentMoney'] receiver_account_final_balance = bankTransfer.get_account( receiver_account_id)['currentMoney'] self.assertEqual(5, sender_account_final_balance) self.assertEqual(35, receiver_account_final_balance)
def test_new_account_starts_with_money_zero(self): account_id = bankTransfer.create_account('test') account = bankTransfer.get_account(account_id) self.assertEqual(0, account['currentMoney'])