Example #1
0
 def tearDown(self):
     i.close_acc()
     i.trans('TM_BANK')
     i.idle()
     super(AccountTestCase, self).tearDown()
Example #2
0
 def test_invalid_trans(self):
     expected = "531 Invalid account state\n"
     i.open_acc()
     response = i.trans('TM_BANK')
     return self.assertEqual(expected, response)
Example #3
0
 def test_valid_below(self):
     i.art_reg(59922827, 1)
     i.close_acc()
     response = i.trans('TM_BANK', 3)
     return self.assertEqual(response, "240 3,99 Transaction succeeded\n")
Example #4
0
 def test_valid_exact(self):
     i.art_reg(59922827, 1)
     i.close_acc()
     response = i.trans('TM_BANK', 6, 99)
     return self.assertEqual(response, "240 0,00 Transaction succeeded\n")
Example #5
0
 def test_valid_neg_699(self):
     i.art_reg(59922827, 1)
     i.close_acc()
     response = i.trans('TM_CASH', -10)
     return self.assertEqual(response, "240 16,99 Transaction succeeded\n")
Example #6
0
 def test_valid_above(self):
     i.art_reg(59922827, 1)
     i.close_acc()
     response = i.trans('TM_BANK', 20)
     return self.assertEqual(response, "240 -13,01 Transaction succeeded\n")
Example #7
0
 def test_valid_negamnt(self):
     i.close_acc()
     response = i.trans('TM_BANK', -10)
     return self.assertEqual(response, "542 FI AMOUNT Transaction failed\n")
Example #8
0
 def test_invalid_method2(self):
     i.close_acc()
     response = i.trans('TM_CASHasd123')
     return self.assertEqual(response, "540 No Such Transaction method\n")
Example #9
0
 def test_valid_mthd(self):
     i.close_acc()
     response = i.trans('TM_BANK')
     return self.assertEqual(response, "240 0,00 Transaction succeeded\n")
Example #10
0
 def tearDown(self):
     i.trans('TM_CASH')
     i.idle()
     i.sign_off()
Example #11
0
def up_to_trans(method='TM_BANK'):
    up_to_close()
    return i.trans(method)