31 lines
1.2 KiB
Python
31 lines
1.2 KiB
Python
from src.modules.Card import Card
|
|
from src.modules.Account import Account
|
|
|
|
# This will immitate all bank accounts that exist
|
|
accounts = [
|
|
{"number": "0123456789", "name": "John", "surname": "Doe", "credit": 50000},
|
|
{"number": "0122222222", "name": "John", "surname": "Two", "credit": 50},
|
|
{"number": "0123444444", "name": "John", "surname": "Digit", "credit": 150},
|
|
{"number": "0111111111", "name": "John", "surname": "Button", "credit": 400},
|
|
]
|
|
|
|
# This will immitate banks API
|
|
bank = {}
|
|
|
|
for account in accounts:
|
|
bank[account["number"]] = Account(account["number"], account["name"], account["surname"], account["credit"])
|
|
|
|
#This will immitate all cards that exist
|
|
cardsInit = [
|
|
{"number": "1111222233334444", "type": "Credit", "pin": "1234", "account": bank["0123456789"]},
|
|
{"number": "2222333344445555", "type": "Prepaid", "pin": "2345", "account": bank["0122222222"]},
|
|
{"number": "3333444455556666", "type": "ATM", "pin": "3456", "account": bank["0123444444"]},
|
|
{"number": "444666", "type": "University ID", "pin": None, "account": None},
|
|
]
|
|
|
|
# This will immitate card providers API
|
|
cards = {}
|
|
|
|
for card in cardsInit:
|
|
cards[card["number"]] = Card(card["number"], card["pin"], card["type"], card["account"])
|