-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import unittest | ||
from app.banking import get_account_balance, transfer_funds | ||
|
||
class TestBanking(unittest.TestCase): | ||
def test_get_account_balance(self): | ||
# Test getting an account balance | ||
account_id = 1 | ||
balance = get_account_balance(account_id) | ||
self.assertIsNotNone(balance) | ||
|
||
def test_transfer_funds(self): | ||
# Test transferring funds between accounts | ||
sender_account_id = 1 | ||
recipient_account_id = 2 | ||
amount = 100.0 | ||
transfer_funds(sender_account_id, recipient_account_id, amount) | ||
# Assert that the funds were transferred successfully | ||
|
||
if __name__ == "__main__": | ||
unittest.main() |