def test_r10(capsys): """ T10 - Reject amount that contains non-numerical characters in agent mode """ helper( capsys=capsys, terminal_input=[ 'login', 'agent', 'withdraw', '1000000', 'asdf324', 'logout' ], intput_valid_accounts=[ '1000000', '0000000' ], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=[ 'EOS 0000000 000 0000000 ***' ] )
def test_r2(capsys): """ T2 - Reject account number that have non-numerical characters """ helper( capsys=capsys, terminal_input=[ 'login', 'machine', 'withdraw', 'basd142', '1000', 'logout' ], intput_valid_accounts=[ '1000000', '0000000' ], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=[ 'EOS 0000000 000 0000000 ***' ] )
def test_r1(capsys): """ T1 - Reject account number that is not in valid account list """ helper( capsys=capsys, terminal_input=[ 'login', 'machine', 'withdraw', '1000001', '1000', 'logout' ], intput_valid_accounts=[ '1000000', '0000000' ], expected_tail_of_terminal_output=[ 'Account Number Not In Use', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=[ 'EOS 0000000 000 0000000 ***' ] )
def test_r8(capsys): """ T8 - Reject amount over $999,999.99 in agent mode """ helper( capsys=capsys, terminal_input=[ 'login', 'agent', 'withdraw', '1000000', '100000000', 'logout' ], intput_valid_accounts=[ '1000000', '0000000' ], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=[ 'EOS 0000000 000 0000000 ***' ] )
def test_r11(capsys): """ T11 - Accept valid withdraw in agent mode """ helper( capsys=capsys, terminal_input=[ 'login', 'agent', 'withdraw', '1000000', '10000', 'logout' ], intput_valid_accounts=[ '1000000', '0000000' ], expected_tail_of_terminal_output=[ 'Exiting Front End' ], expected_output_transactions=[ 'WDR 1000000 10000 0000000 ***', 'EOS 0000000 000 0000000 ***' ] )
def test_r4(capsys): """ T4 - Reject withdraw amount that is less than $0 in ATM mode """ helper( capsys=capsys, terminal_input=[ 'login', 'machine', 'withdraw', '1000000', '-1000', 'logout' ], intput_valid_accounts=[ '1000000', '0000000' ], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=[ 'EOS 0000000 000 0000000 ***' ] )
def test_r1(capsys): """ T1 - Checking if login accepted in ATM (machine) mode, no valid accounts """ helper(capsys=capsys, terminal_input=['login', 'machine', 'logout'], intput_valid_accounts=['0000000'], expected_tail_of_terminal_output=['Exiting Front End'], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r4(capsys): """ T4 - Checking if login accepted in agent mode and takes in valid accounts """ helper(capsys=capsys, terminal_input=['login', 'agent', 'logout'], intput_valid_accounts=['1000327', '1043565', '0000000'], expected_tail_of_terminal_output=['Exiting Front End'], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r7(capsys): """ T7 - Checking that subsequent logins are rejected after logged in """ helper(capsys=capsys, terminal_input=['login', 'machine', 'login', 'logout'], intput_valid_accounts=['0000000'], expected_tail_of_terminal_output=[ 'Session already logged in', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r5(capsys): """ T5 - Checking that invalid input for session type is rejected """ helper(capsys=capsys, terminal_input=['login', 'a23bd', 'agent', 'logout'], intput_valid_accounts=['0000000'], expected_tail_of_terminal_output=[ 'Machine or Agent:', 'Invalid Input', 'Machine or Agent:', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r1(capsys): """ T1 - ATM Case: Reject attempt to delet an account in ATM mode. """ helper(capsys=capsys, terminal_input=['login', 'machine', 'deleteacct', 'logout'], intput_valid_accounts=['1000327', '0000000'], expected_tail_of_terminal_output=[ 'Cannot perform command in ATM mode', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r7(capsys): """ T7 - Accept valid deposit in ATM mode """ helper(capsys=capsys, terminal_input=[ 'login', 'machine', 'deposit', '1000000', '100000', 'logout' ], intput_valid_accounts=['1000000', '0000000'], expected_tail_of_terminal_output=['Exiting Front End'], expected_output_transactions=[ 'DEP 1000000 100000 0000000 ***', 'EOS 0000000 000 0000000 ***' ])
def test_r6(capsys): """ T6 - Checking that alternative command before login rejected """ helper(capsys=capsys, terminal_input=['logout', 'login', 'agent', 'logout'], intput_valid_accounts=['0000000'], expected_tail_of_terminal_output=[ 'Must login before doing an alternative command', 'Type Login to login', 'Command:', 'Machine or Agent:', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r3(capsys): """ T3 - Reject deposit amount exceeding $2000 in ATM mode """ helper(capsys=capsys, terminal_input=[ 'login', 'machine', 'deposit', '1000000', '1000000', 'logout' ], intput_valid_accounts=['1000000', '0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r5(capsys): """ T5 - Reject amount that have non-numerical characters in ATM mode """ helper(capsys=capsys, terminal_input=[ 'login', 'machine', 'deposit', '1000000', 'adsf1234', 'logout' ], intput_valid_accounts=['1000000', '0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r9(capsys): """ T9 - Reject amount less than $0 in agent mode """ helper(capsys=capsys, terminal_input=[ 'login', 'agent', 'deposit', '1000000', '-1000', 'logout' ], intput_valid_accounts=['1000000', '0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r7(capsys): """ T7 - Agent Case: Rejection of the creation of an account with a name shorter then 3 letters. """ helper(capsys=capsys, terminal_input=[ 'login', 'agent', 'createacct', '3270000', 'Sp', 'logout' ], intput_valid_accounts=['0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Name', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r3(capsys): """ T3 - Agent Case: Reject attempt to delete an account which is not in the valid account list. """ helper(capsys=capsys, terminal_input=[ 'login', 'agent', 'deleteacct', 'aaa1010', 'Spencer Venable', 'logout' ], intput_valid_accounts=['0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Name', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r4(capsys): """ T4 - Agent Case: Rejection of the creation of an account which has a number longer then 7 numbers. """ helper(capsys=capsys, terminal_input=[ 'login', 'agent', 'createacct', '10327000', 'Ben Lammers', 'logout' ], intput_valid_accounts=['0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Name', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r2(capsys): """ T2 - Agent Case: Rejection of account creation with an account number that already exisits. """ helper(capsys=capsys, terminal_input=[ 'login', 'agent', 'createacct', '3270000', 'Ben Lammers', 'logout' ], intput_valid_accounts=['3270000', '0000000'], expected_tail_of_terminal_output=[ 'Account Number Already in Use', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r8(capsys): """ T8 - Agent Case: Rejection of an account created with a name longer then 30 letters. """ helper(capsys=capsys, terminal_input=[ 'login', 'agent', 'createacct', '3270000', 'Spener Cory Park Venable Long Name Ya Yeet', 'logout' ], intput_valid_accounts=['0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Name', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r6(capsys): """ T6 - Agent Case: Rejection of the creation of an account which has an account number which dEOS 0000000 000 0000000 *** not have 7 numerical digits. """ helper(capsys=capsys, terminal_input=[ 'login', 'agent', 'createacct', 'yeetest', 'Spencer Venable', 'logout' ], intput_valid_accounts=['0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Name', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r4(capsys): """ T4 - ATM Case: Rejection of a transfer with an amount less than zero dollars. """ helper(capsys=capsys, terminal_input=[ 'login', 'machine', 'transfer', '1000327', '3270000', '-1', 'logout' ], intput_valid_accounts=['1000327', '3270000', '0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r5(capsys): """ T5 - ATM Case: Rejection of a transfer with an amount that contains non-numeric characters. """ helper(capsys=capsys, terminal_input=[ 'login', 'machine', 'transfer', '1000327', '3270000', '1asd12', 'logout' ], intput_valid_accounts=['1000327', '3270000', '0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r2(capsys): """ T2 - ATM Case: Rejection of a transfer to or from an account that has a non-numeric character. """ helper(capsys=capsys, terminal_input=[ 'login', 'machine', 'transfer', '1000327', 'ABC0001', '20000', 'logout' ], intput_valid_accounts=['1000327', '0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r9(capsys): """ T9 - Agent Case: Reject transfer amount that is less than 0. """ helper(capsys=capsys, terminal_input=[ 'login', 'agent', 'transfer', '1000327', '3270000', '-1', 'logout' ], intput_valid_accounts=['1000327', '3270000', '0000000'], expected_tail_of_terminal_output=[ 'Invalid Account Number or Amount', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=['EOS 0000000 000 0000000 ***'])
def test_r6(capsys): """ T6 - Reject withdraw of more than $5000 in a day in ATM mode """ helper( capsys=capsys, terminal_input=[ 'login', 'machine', 'withdraw', '1000000', '100000', 'withdraw', '1000000', '100000', 'withdraw', '1000000', '100000', 'withdraw', '1000000', '100000', 'withdraw', '1000000', '100000', 'withdraw', '1000000', '100000', 'logout' ], intput_valid_accounts=[ '1000000', '0000000' ], expected_tail_of_terminal_output=[ 'Exceeded ATM Withdrawal Limit', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=[ 'WDR 1000000 100000 0000000 ***', 'WDR 1000000 100000 0000000 ***', 'WDR 1000000 100000 0000000 ***', 'WDR 1000000 100000 0000000 ***', 'WDR 1000000 100000 0000000 ***', 'EOS 0000000 000 0000000 ***' ] )
def test_r6(capsys): """ T6 - ATM Case: Rejection of a transfering more then 10000 dollars in one day. """ helper(capsys=capsys, terminal_input=[ 'login', 'machine', 'transfer', '1000327', '3270000', '550000', 'transfer', '1000327', '3270000', '550000', 'logout' ], intput_valid_accounts=['1000327', '3270000', '0000000'], expected_tail_of_terminal_output=[ 'Exceeded ATM Transfer Limit', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=[ 'XFR 1000327 550000 3270000 ***', 'EOS 0000000 000 0000000 ***' ])
def test_r11(capsys): """ T11 - Agent Case: Accept valid transfer amount. """ helper(capsys=capsys, terminal_input=[ 'login', 'agent', 'transfer', '1000327', '3270000', '100000', 'logout' ], intput_valid_accounts=['1000327', '3270000', '0000000'], expected_tail_of_terminal_output=[ 'Transfer Completed', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=[ 'XFR 1000327 100000 3270000 ***', 'EOS 0000000 000 0000000 ***' ])
def test_r7(capsys): """ T7 - ATM Case: Acceptance of a valid transfer. """ helper(capsys=capsys, terminal_input=[ 'login', 'machine', 'transfer', '1000327', '3270000', '550000', 'logout' ], intput_valid_accounts=['1000327', '3270000', '0000000'], expected_tail_of_terminal_output=[ 'Transfer Completed', 'Command:', 'Session Logged Out', 'Exiting Front End' ], expected_output_transactions=[ 'XFR 1000327 550000 3270000 ***', 'EOS 0000000 000 0000000 ***' ])