def mock_bank(): account_details = { 250: { '8012': { 'balance': 1000.00 }, '7095': { 'balance': 32500.95 } }, 650: { '4000': { 'balance': 350.10 } } } ab = AceBank() ab.account_details = account_details return ab
def ace_bank(): return AceBank()
def setup_case_a(): ab = AceBank() # setup account for customer 234 ab.create_account(account_number='0808', balance=1000.00, customer_id=234) return ab
def setup_case_b(): ab = AceBank() # setup account for customer 756 ab.create_account(account_number='0903', balance=100.00, customer_id=756) ab.create_account(account_number='0875', balance=6000.00, customer_id=756) return ab
# Testing AceBank Class in src/AceBank from src.AceBank import AceBank if __name__ == '__main__': # initiate AceBank with customer id 234 ab = AceBank() # setup account for customer 234 ab.create_account(account_number='0808', balance=1000.00, customer_id=234) # deposit money for account 0808 ab.deposit_fund('0808', 500.00, 'usdollars', 234) # withdraw from account 0808 ab.withdraw_funds('0808', 100.00, 'caddollars', 234) # get balance from account 0808 balance = ab.get_balance('0808', 234) print(f"Balance of account 0808 after last transaction is {balance}") # initiate AceBank with customer id 756 ab = AceBank() # setup accounts for customer 756 ab.create_account(account_number='0903', balance=100.00, customer_id=756) ab.create_account(account_number='0875', balance=6000.00, customer_id=756) # withdraw from account 0875 ab.withdraw_funds('0875', 700.00, 'usdollars', 756) # deposit fund to 0903 ab.deposit_fund('0903', 2500.00, 'euros', 756) # transfer fund from 0875 to 0903