Skip to content

Commit

Permalink
Create test_banking.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Sep 22, 2024
1 parent 0ee78eb commit d6f2082
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bank_integration/banks/banking_app/tests/test_banking.py
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()

0 comments on commit d6f2082

Please sign in to comment.